Ver código fonte

fix: api usage

Timothy Jaeryang Baek 2 meses atrás
pai
commit
ff84c120f5
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      backend/open_webui/utils/payload.py

+ 2 - 2
backend/open_webui/utils/payload.py

@@ -15,9 +15,9 @@ def apply_model_system_prompt_to_body(
         return form_data
         return form_data
 
 
     if metadata:
     if metadata:
-        print("apply_model_system_prompt_to_body: metadata", metadata)
         variables = metadata.get("variables", {})
         variables = metadata.get("variables", {})
-        system = prompt_variables_template(system, variables)
+        if variables:
+            system = prompt_variables_template(system, variables)
 
 
     form_data["messages"] = add_or_update_system_message(
     form_data["messages"] = add_or_update_system_message(
         system, form_data.get("messages", [])
         system, form_data.get("messages", [])