qver3nc1a commited on
Commit
923dce8
·
verified ·
1 Parent(s): d768e11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -17
app.py CHANGED
@@ -35,24 +35,9 @@ class BasicAgent:
35
  def __call__(self, question: str) -> str:
36
  print(f"Agent received question: {question[:50]}...")
37
 
38
- # Define tools using the Tool class
39
- web_search_tool = ToolNode(
40
- tool=Tool(
41
- name="WebSearch",
42
- func=DuckDuckGoSearchRun().run,
43
- description="Search the web for information."
44
- )
45
- )
46
-
47
- open_webpage_tool = ToolNode(
48
- tool=Tool(
49
- name="OpenWebPage",
50
- func=wikipedia_search,
51
- description="Search Wikipedia for information."
52
- )
53
- )
54
 
55
- # Instantiate the agent with the tools
56
  agent = ToolCallingAgent(
57
  tools=[web_search_tool, open_webpage_tool],
58
  model=LiteLLMModel(
 
35
  def __call__(self, question: str) -> str:
36
  print(f"Agent received question: {question[:50]}...")
37
 
38
+ web_search_tool = ToolNode([DuckDuckGoSearchRun().run])
39
+ open_webpage_tool = ToolNode([wikipedia_search])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
 
41
  agent = ToolCallingAgent(
42
  tools=[web_search_tool, open_webpage_tool],
43
  model=LiteLLMModel(