kk20krishna commited on
Commit
a8eb7e8
·
verified ·
1 Parent(s): 9a060d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -238,20 +238,19 @@ def setup_agent(file):
238
  )
239
 
240
  tools = [
241
- Tool(
242
- name="PolicyRetrievalRAG",
243
- func=retrieval_chain.run,
244
- description="Use this to retreive policy clauses from the policy."
245
- )
246
  ]
247
 
248
  agent_executor = initialize_agent(
249
  tools=tools,
250
- #llm=ChatOpenAI(model="gpt-3.5-turbo"),
251
  llm=ChatOpenAI(model="gpt-4o"),
252
- agent=AgentType.CONVERSATIONAL_REACT_DESCRIPTION,
253
- #agent=AgentType.CHAT_CONVERSATIONAL_REACT_DESCRIPTION,
254
  memory=memory,
 
255
  verbose=True
256
  )
257
 
 
238
  )
239
 
240
  tools = [
241
+ Tool(
242
+ name="PolicyRetrievalRAG",
243
+ func=retrieval_chain.run,
244
+ description="Use this tool to retrieve the most relevant clauses from the insurance policy based on the user's question."
245
+ )
246
  ]
247
 
248
  agent_executor = initialize_agent(
249
  tools=tools,
 
250
  llm=ChatOpenAI(model="gpt-4o"),
251
+ agent=AgentType.CHAT_CONVERSATIONAL_REACT_DESCRIPTION,
 
252
  memory=memory,
253
+ handle_parsing_errors=True,
254
  verbose=True
255
  )
256