Update app.py

This commit is contained in:
Alex 2023-02-23 18:05:21 +00:00
parent fabe4d53d6
commit e5aaaf78f0

View File

@ -75,7 +75,6 @@ def api_answer():
question = data["question"]
history = data["history"]
print('-'*5)
print(data["embeddings_key"])
if not api_key_set:
api_key = data["api_key"]
else:
@ -110,7 +109,6 @@ def api_answer():
# create a prompt template
if history:
history = json.loads(history)
print(history)
template_temp = template_hist.replace("{historyquestion}", history[0]).replace("{historyanswer}", history[1])
c_prompt = PromptTemplate(input_variables=["summaries", "question"], template=template_temp, template_format="jinja2")
else: