mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-17 21:26:26 +00:00
commit
3c7ac76a72
@ -107,9 +107,9 @@ def api_answer():
|
|||||||
if history:
|
if history:
|
||||||
history = json.loads(history)
|
history = json.loads(history)
|
||||||
template_temp = template_hist.replace("{historyquestion}", history[0]).replace("{historyanswer}", history[1])
|
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:
|
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":
|
if llm_choice == "openai":
|
||||||
llm = OpenAI(openai_api_key=api_key, temperature=0)
|
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.
|
FINAL ANSWER: You can't eat vegetables using pandas. You can only eat them using your mouth.
|
||||||
SOURCES:
|
SOURCES:
|
||||||
|
|
||||||
QUESTION: {question}
|
QUESTION: {{ question }}
|
||||||
=========
|
=========
|
||||||
{summaries}
|
{{ summaries }}
|
||||||
=========
|
=========
|
||||||
FINAL ANSWER:
|
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')
|
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
|
SOURCES: 28-pl 30-pl
|
||||||
|
|
||||||
QUESTION: {historyquestion}
|
QUESTION: {{ historyquestion }}
|
||||||
=========
|
=========
|
||||||
CONTENT:
|
CONTENT:
|
||||||
SOURCE:
|
SOURCE:
|
||||||
=========
|
=========
|
||||||
FINAL ANSWER: {historyanswer}
|
FINAL ANSWER: {{ historyanswer }}
|
||||||
SOURCES:
|
SOURCES:
|
||||||
|
|
||||||
QUESTION: {question}
|
QUESTION: {{ question }}
|
||||||
=========
|
=========
|
||||||
{summaries}
|
{{ summaries }}
|
||||||
=========
|
=========
|
||||||
FINAL ANSWER:
|
FINAL ANSWER:
|
Loading…
Reference in New Issue
Block a user