refac
This commit is contained in:
@@ -7,7 +7,7 @@ from open_webui.utils.misc import (
|
||||
deep_update,
|
||||
replace_system_message_content,
|
||||
)
|
||||
from open_webui.utils.chat_variables import render_chat_variables
|
||||
from open_webui.utils.chat_variables import render_chat_variables, render_user_variables
|
||||
from open_webui.utils.task import prompt_template, prompt_variables_template
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ async def resolve_system_prompt(
|
||||
required=False,
|
||||
)
|
||||
|
||||
system = render_user_variables(system, getattr(user, 'variables', {}) if user else {})
|
||||
|
||||
# Metadata (WebUI Usage)
|
||||
if metadata:
|
||||
variables = metadata.get('variables', {})
|
||||
|
||||
Reference in New Issue
Block a user