mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
Merge pull request #16071 from GSAlex/main
fix: Render template variables in folder system prompts
This commit is contained in:
commit
58dbd869ba
1 changed files with 6 additions and 2 deletions
|
|
@ -83,6 +83,7 @@ from open_webui.utils.filter import (
|
|||
process_filter_functions,
|
||||
)
|
||||
from open_webui.utils.code_interpreter import execute_code_jupyter
|
||||
from open_webui.utils.payload import apply_model_system_prompt_to_body
|
||||
|
||||
from open_webui.tasks import create_task
|
||||
|
||||
|
|
@ -774,8 +775,11 @@ async def process_chat_payload(request, form_data, user, metadata, model):
|
|||
|
||||
if folder and folder.data:
|
||||
if "system_prompt" in folder.data:
|
||||
form_data["messages"] = add_or_update_system_message(
|
||||
folder.data["system_prompt"], form_data["messages"]
|
||||
form_data = apply_model_system_prompt_to_body(
|
||||
folder.data["system_prompt"],
|
||||
form_data,
|
||||
metadata,
|
||||
user
|
||||
)
|
||||
if "files" in folder.data:
|
||||
form_data["files"] = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue