Merge pull request #108 from arc53/fix-formatting

fix formatting
pull/109/head
Pavel 2 years ago committed by GitHub
commit 3c7ac76a72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)

@ -20,8 +20,8 @@ Source: 0-pl
FINAL ANSWER: You can't eat vegetables using pandas. You can only eat them using your mouth.
SOURCES:
QUESTION: {question}
QUESTION: {{ question }}
=========
{summaries}
{{ summaries }}
=========
FINAL ANSWER:

@ -12,16 +12,16 @@ Source: 30-pl
FINAL ANSWER: To merge two tables in pandas, you can use the pd.merge() function. The basic syntax is: \n\npd.merge(left, right, on, how) \n\nwhere left and right are the two tables to merge, on is the column to merge on, and how is the type of merge to perform. \n\nFor example, to merge the two tables df1 and df2 on the column 'id', you can use: \n\npd.merge(df1, df2, on='id', how='inner')
SOURCES: 28-pl 30-pl
QUESTION: {historyquestion}
QUESTION: {{ historyquestion }}
=========
CONTENT:
SOURCE:
=========
FINAL ANSWER: {historyanswer}
FINAL ANSWER: {{ historyanswer }}
SOURCES:
QUESTION: {question}
QUESTION: {{ question }}
=========
{summaries}
{{ summaries }}
=========
FINAL ANSWER:
Loading…
Cancel
Save