DrishtiSharma commited on
Commit
8470418
·
verified ·
1 Parent(s): 7dfa061

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -232,6 +232,10 @@ def run_agent(
232
 
233
  # Debugging: Print tools being used
234
  st.write("**Tools being used by the agent:**", [tool.name for tool in tools])
 
 
 
 
235
 
236
 
237
  llm = get_chat_model(model, temperature, [StreamHandler(st.empty())])
@@ -408,6 +412,7 @@ def get_retriever() -> None:
408
  "this tool!"
409
  ),
410
  )
 
411
  if st.session_state.retriever_tool:
412
  st.success("Retriever tool has been successfully initialized and is ready to use.")
413
  else:
@@ -759,6 +764,7 @@ def set_tools() -> List[Tool]:
759
  tool_dictionary[key]
760
  for key in tool_names if tool_dictionary[key] is not None
761
  ]
 
762
  st.session_state.tool_names[0] = tool_names
763
 
764
  return tools
@@ -1057,6 +1063,8 @@ def create_text(model: str) -> None:
1057
  # Set the agent prompts and tools
1058
  set_prompts(agent_type)
1059
  tools = set_tools()
 
 
1060
 
1061
  image_urls = []
1062
  with st.sidebar:
 
232
 
233
  # Debugging: Print tools being used
234
  st.write("**Tools being used by the agent:**", [tool.name for tool in tools])
235
+ if "retriever" in [tool.name for tool in tools]:
236
+ st.write("✅ Retriever tool is included in the tools list.")
237
+ else:
238
+ st.error("❌ Retriever tool is missing. Check the tool setup.")
239
 
240
 
241
  llm = get_chat_model(model, temperature, [StreamHandler(st.empty())])
 
412
  "this tool!"
413
  ),
414
  )
415
+
416
  if st.session_state.retriever_tool:
417
  st.success("Retriever tool has been successfully initialized and is ready to use.")
418
  else:
 
764
  tool_dictionary[key]
765
  for key in tool_names if tool_dictionary[key] is not None
766
  ]
767
+ st.write("**Tools selected in set_tools:**", [tool.name for tool in tools])
768
  st.session_state.tool_names[0] = tool_names
769
 
770
  return tools
 
1063
  # Set the agent prompts and tools
1064
  set_prompts(agent_type)
1065
  tools = set_tools()
1066
+ st.write("**Tools passed to run_agent:**", [tool.name for tool in tools])
1067
+
1068
 
1069
  image_urls = []
1070
  with st.sidebar: