Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -58,10 +58,15 @@ def wiki_search(query: str) -> list:
|
|
| 58 |
|
| 59 |
return llama_docs
|
| 60 |
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
| 64 |
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
agent = AgentWorkflow.from_tools_or_functions(tools, llm=llm)
|
|
|
|
| 58 |
|
| 59 |
return llama_docs
|
| 60 |
|
| 61 |
+
web_search = FunctionTool(
|
| 62 |
+
web_search,
|
| 63 |
+
metadata=ToolMetadata(name="web_search", description="Tavily 3-hit search")
|
| 64 |
+
)
|
| 65 |
|
| 66 |
+
wiki_search = FunctionTool(
|
| 67 |
+
wiki_search,
|
| 68 |
+
metadata=ToolMetadata(name="wiki_search", description="Wikipedia 2-hit search")
|
| 69 |
+
)
|
| 70 |
+
tools = [web_search, wiki_search]
|
| 71 |
|
| 72 |
agent = AgentWorkflow.from_tools_or_functions(tools, llm=llm)
|