danielcwq commited on
Commit
3052b9e
·
1 Parent(s): 8cbf41f

Update query_data.py

Browse files
Files changed (1) hide show
  1. query_data.py +2 -1
query_data.py CHANGED
@@ -1,6 +1,7 @@
1
  from langchain.prompts.prompt import PromptTemplate
2
  from langchain.llms import OpenAI
3
  from langchain.chains import ChatVectorDBChain
 
4
 
5
  _template = """Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.
6
  You can assume the question about the syllabus of the H2 Economics, H2 History and H2 Geography A-Level Examinations in Singapore.
@@ -24,7 +25,7 @@ QA_PROMPT = PromptTemplate(template=template, input_variables=["question", "cont
24
 
25
 
26
  def get_chain(vectorstore):
27
- llm = OpenAI(temperature=0, model_name = "text-davinci-003")
28
  qa_chain = ChatVectorDBChain.from_llm(
29
  llm,
30
  vectorstore,
 
1
  from langchain.prompts.prompt import PromptTemplate
2
  from langchain.llms import OpenAI
3
  from langchain.chains import ChatVectorDBChain
4
+ from langchain.chat_models import ChatOpenAI
5
 
6
  _template = """Given the following conversation and a follow up question, rephrase the follow up question to be a standalone question.
7
  You can assume the question about the syllabus of the H2 Economics, H2 History and H2 Geography A-Level Examinations in Singapore.
 
25
 
26
 
27
  def get_chain(vectorstore):
28
+ llm = ChatOpenAI(temperature=0)
29
  qa_chain = ChatVectorDBChain.from_llm(
30
  llm,
31
  vectorstore,