Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,20 +40,9 @@ def wikipedia_search(query: str):
|
|
| 40 |
class BasicAgent:
|
| 41 |
def __init__(self, model_id="ollama/qwen2:7b", api_base="http://192.168.1.77:11434"):
|
| 42 |
print('BasicAgent initialized.')
|
| 43 |
-
self.
|
| 44 |
-
Tool(
|
| 45 |
-
name="WebSearch",
|
| 46 |
-
func=web_search,
|
| 47 |
-
description="Search the web for information."
|
| 48 |
-
),
|
| 49 |
-
Tool(
|
| 50 |
-
name="WikipediaSearch",
|
| 51 |
-
func=wikipedia_search,
|
| 52 |
-
description="Search Wikipedia for information."
|
| 53 |
-
)
|
| 54 |
-
]
|
| 55 |
self.agent = ToolCallingAgent(
|
| 56 |
-
tools=self.
|
| 57 |
model=LiteLLMModel(
|
| 58 |
model_id=model_id,
|
| 59 |
api_base=api_base
|
|
|
|
| 40 |
class BasicAgent:
|
| 41 |
def __init__(self, model_id="ollama/qwen2:7b", api_base="http://192.168.1.77:11434"):
|
| 42 |
print('BasicAgent initialized.')
|
| 43 |
+
self.tool_node = [web_search, wikipedia_search]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
self.agent = ToolCallingAgent(
|
| 45 |
+
tools=[self.tool_node],
|
| 46 |
model=LiteLLMModel(
|
| 47 |
model_id=model_id,
|
| 48 |
api_base=api_base
|