fix: backslash rag content issue

This commit is contained in:
Timothy J. Baek 2024-03-15 13:34:52 -07:00
parent cd92cf0da5
commit 072b499a50

View file

@ -91,9 +91,8 @@ def query_collection(
def rag_template(template: str, context: str, query: str): def rag_template(template: str, context: str, query: str):
template = re.sub(r"\[context\]", context, template) template = template.replace("[context]", context)
template = re.sub(r"\[query\]", query, template) template = template.replace("[query]", query)
return template return template