Timothy Jaeryang Baek 2 ヶ月 前
コミット
c846a550fa
1 ファイル変更2 行追加0 行削除
  1. 2 0
      backend/open_webui/utils/task.py

+ 2 - 0
backend/open_webui/utils/task.py

@@ -152,6 +152,8 @@ def rag_template(template: str, context: str, query: str):
     if template.strip() == "":
     if template.strip() == "":
         template = DEFAULT_RAG_TEMPLATE
         template = DEFAULT_RAG_TEMPLATE
 
 
+    template = prompt_template(template)
+
     if "[context]" not in template and "{{CONTEXT}}" not in template:
     if "[context]" not in template and "{{CONTEXT}}" not in template:
         log.debug(
         log.debug(
             "WARNING: The RAG template does not contain the '[context]' or '{{CONTEXT}}' placeholder."
             "WARNING: The RAG template does not contain the '[context]' or '{{CONTEXT}}' placeholder."