ryanrwatkins commited on
Commit
375d1b9
Β·
1 Parent(s): 103f958

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -110,7 +110,7 @@ def submit_message(prompt, prompt_template, temperature, max_tokens, context_len
110
  #completion = completion.run(query)
111
  # from https://blog.devgenius.io/chat-with-document-s-using-openai-chatgpt-api-and-text-embedding-6a0ce3dc8bc8
112
 
113
- completion = VectorDBQA.from_chain_type(llm=ChatOpenAI(temperature=temperature, max_tokens=max_tokens, model_name="gpt-3.5-turbo"), chain_type="stuff", vectorstore=vectordb, return_source_documents=True)
114
  query = str(system_prompt + history[-context_length*2:] + [prompt_msg])
115
  completion = completion({"query": query})
116
  # completion = completion({"question": query, "chat_history": history[-context_length*2:]})
 
110
  #completion = completion.run(query)
111
  # from https://blog.devgenius.io/chat-with-document-s-using-openai-chatgpt-api-and-text-embedding-6a0ce3dc8bc8
112
 
113
+ completion = RetrievalQA.from_chain_type(llm=ChatOpenAI(temperature=temperature, max_tokens=max_tokens, model_name="gpt-3.5-turbo"), chain_type="stuff", vectorstore=vectordb, return_source_documents=True)
114
  query = str(system_prompt + history[-context_length*2:] + [prompt_msg])
115
  completion = completion({"query": query})
116
  # completion = completion({"question": query, "chat_history": history[-context_length*2:]})