mirror of
https://github.com/open-webui/open-webui
synced 2025-06-04 03:37:35 +00:00
refac
This commit is contained in:
parent
59dd798156
commit
c846a550fa
@ -152,6 +152,8 @@ def rag_template(template: str, context: str, query: str):
|
||||
if template.strip() == "":
|
||||
template = DEFAULT_RAG_TEMPLATE
|
||||
|
||||
template = prompt_template(template)
|
||||
|
||||
if "[context]" not in template and "{{CONTEXT}}" not in template:
|
||||
log.debug(
|
||||
"WARNING: The RAG template does not contain the '[context]' or '{{CONTEXT}}' placeholder."
|
||||
|
Loading…
Reference in New Issue
Block a user