ryanrwatkins commited on
Commit
4cb9ad4
1 Parent(s): d7c5520

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -115,8 +115,10 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
115
  completion = RetrievalQA(combine_documents_chain=completion_chain, retriever=vectordb.as_retriever(), return_source_documents=True)
116
  #completion = RetrievalQA.from_chain_type(llm=ChatOpenAI(temperature=temperature, max_tokens=max_tokens, model_name="gpt-3.5-turbo"), chain_type="stuff", retriever=vectordb.as_retriever(), return_source_documents=True)
117
  query = str(system_prompt + history[-context_length*2:] + [prompt_msg])
118
- completion = completion({"query": query})
119
- logger.info(completion["result"])
 
 
120
  # completion = completion({"question": query, "chat_history": history[-context_length*2:]})
121
 
122
 
 
115
  completion = RetrievalQA(combine_documents_chain=completion_chain, retriever=vectordb.as_retriever(), return_source_documents=True)
116
  #completion = RetrievalQA.from_chain_type(llm=ChatOpenAI(temperature=temperature, max_tokens=max_tokens, model_name="gpt-3.5-turbo"), chain_type="stuff", retriever=vectordb.as_retriever(), return_source_documents=True)
117
  query = str(system_prompt + history[-context_length*2:] + [prompt_msg])
118
+ #completion = completion({"query": query})
119
+ completion = completion.run(query)
120
+ logger.info("test")
121
+ logger.info(completion)
122
  # completion = completion({"question": query, "chat_history": history[-context_length*2:]})
123
 
124