fix formatting

This commit is contained in:
Alex
2023-02-20 11:25:39 +00:00
parent f60a5d9560
commit 1f683582c0
3 changed files with 8 additions and 8 deletions

View File

@@ -107,9 +107,9 @@ def api_answer():
if history:
history = json.loads(history)
template_temp = template_hist.replace("{historyquestion}", history[0]).replace("{historyanswer}", history[1])
c_prompt = PromptTemplate(input_variables=["summaries", "question"], template=template_temp)
c_prompt = PromptTemplate(input_variables=["summaries", "question"], template=template_temp, template_format="jinja2")
else:
c_prompt = PromptTemplate(input_variables=["summaries", "question"], template=template)
c_prompt = PromptTemplate(input_variables=["summaries", "question"], template=template, template_format="jinja2")
if llm_choice == "openai":
llm = OpenAI(openai_api_key=api_key, temperature=0)