Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 39 |
-
|
| 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(
|