robertselvam commited on
Commit
677cf57
·
verified ·
1 Parent(s): 5fabef3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -117,7 +117,7 @@ class ChatDocumentQA:
117
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
118
 
119
  # llm = ChatOpenAI(temperature=0)
120
- llm=AzureChatOpenAI(azure_deployment = "GPT3-INS")
121
 
122
  return ConversationalRetrievalChain.from_llm(llm=llm, retriever=vectorstore.as_retriever(),
123
  condense_question_prompt=CONDENSE_QUESTION_PROMPT,
@@ -141,7 +141,7 @@ class ChatDocumentQA:
141
  # memory,tools,prompt = self.create_memory_for_csv_qa(tools)
142
  # agent_chain = self.create_agent_chain_for_csv_qa(memory,tools,prompt)
143
  agent_chain = create_csv_agent(
144
- AzureChatOpenAI(azure_deployment = "GPT3-INS"),
145
  file_path,
146
  verbose=True,
147
  agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
@@ -175,7 +175,7 @@ class ChatDocumentQA:
175
  #************************
176
  def create_agent(self,file_path):
177
  agent_chain = create_csv_agent(
178
- AzureChatOpenAI(azure_deployment = "GPT3-INS"),
179
  file_path,
180
  verbose=True,
181
  agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
@@ -212,7 +212,7 @@ class ChatDocumentQA:
212
 
213
  def create_agent_chain_for_csv_qa(self,memory,tools,prompt):
214
 
215
- llm_chain = LLMChain(llm=AzureChatOpenAI(azure_deployment = "GPT3-INS"), prompt=prompt)
216
  agent = ZeroShotAgent(llm_chain=llm_chain, tools=tools, verbose=True)
217
  agent_chain = AgentExecutor.from_agent_and_tools(
218
  agent=agent, tools=tools, verbose=True, memory=memory
 
117
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
118
 
119
  # llm = ChatOpenAI(temperature=0)
120
+ llm=AzureChatOpenAI(azure_deployment = "GPT-3")
121
 
122
  return ConversationalRetrievalChain.from_llm(llm=llm, retriever=vectorstore.as_retriever(),
123
  condense_question_prompt=CONDENSE_QUESTION_PROMPT,
 
141
  # memory,tools,prompt = self.create_memory_for_csv_qa(tools)
142
  # agent_chain = self.create_agent_chain_for_csv_qa(memory,tools,prompt)
143
  agent_chain = create_csv_agent(
144
+ AzureChatOpenAI(azure_deployment = "GPT-3"),
145
  file_path,
146
  verbose=True,
147
  agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
 
175
  #************************
176
  def create_agent(self,file_path):
177
  agent_chain = create_csv_agent(
178
+ AzureChatOpenAI(azure_deployment = "GPT-3"),
179
  file_path,
180
  verbose=True,
181
  agent_type=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
 
212
 
213
  def create_agent_chain_for_csv_qa(self,memory,tools,prompt):
214
 
215
+ llm_chain = LLMChain(llm=AzureChatOpenAI(azure_deployment = "GPT-3"), prompt=prompt)
216
  agent = ZeroShotAgent(llm_chain=llm_chain, tools=tools, verbose=True)
217
  agent_chain = AgentExecutor.from_agent_and_tools(
218
  agent=agent, tools=tools, verbose=True, memory=memory