Spaces:
Runtime error
Runtime error
ryanrwatkins
commited on
Commit
Β·
2fa0584
1
Parent(s):
68ac0c3
Update app.py
Browse files
app.py
CHANGED
@@ -171,13 +171,13 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
|
|
171 |
|
172 |
chain = load_qa_chain(ChatOpenAI(temperature=temperature, max_tokens=max_tokens, model_name="gpt-3.5-turbo"), chain_type="stuff")
|
173 |
completion = chain.run(input_documents=docs, question=query)
|
174 |
-
|
175 |
|
176 |
# VectorDBQA.from_chain_type(llm=OpenAI(), chain_type="stuff", vectorstore=docsearch, return_source_documents=True)
|
177 |
# https://colab.research.google.com/drive/1dzdNDZyofRB0f2KIB4gHXmIza7ehMX30?usp=sharing#scrollTo=b-ejDn_JfpWW
|
178 |
|
179 |
history.append(prompt_msg)
|
180 |
-
history.append(completion
|
181 |
#history.append(completion.choices[0].message.to_dict())
|
182 |
#history.append(completion["result"].choices[0].message.to_dict())
|
183 |
|
|
|
171 |
|
172 |
chain = load_qa_chain(ChatOpenAI(temperature=temperature, max_tokens=max_tokens, model_name="gpt-3.5-turbo"), chain_type="stuff")
|
173 |
completion = chain.run(input_documents=docs, question=query)
|
174 |
+
completion = { "content": completion }
|
175 |
|
176 |
# VectorDBQA.from_chain_type(llm=OpenAI(), chain_type="stuff", vectorstore=docsearch, return_source_documents=True)
|
177 |
# https://colab.research.google.com/drive/1dzdNDZyofRB0f2KIB4gHXmIza7ehMX30?usp=sharing#scrollTo=b-ejDn_JfpWW
|
178 |
|
179 |
history.append(prompt_msg)
|
180 |
+
history.append(completion)
|
181 |
#history.append(completion.choices[0].message.to_dict())
|
182 |
#history.append(completion["result"].choices[0].message.to_dict())
|
183 |
|