Spaces:
Sleeping
Sleeping
correct import of tool from langchain
Browse files
agent.py
CHANGED
|
@@ -56,7 +56,7 @@ class TestAgent:
|
|
| 56 |
from smolagents import CodeAgent, OpenAIServerModel, DuckDuckGoSearchTool, FinalAnswerTool, VisitWebpageTool, MCPClient
|
| 57 |
|
| 58 |
# import additional tool from langchain @ https://docs.langchain.com/oss/python/integrations/tools
|
| 59 |
-
from
|
| 60 |
from smolagents import Tool
|
| 61 |
wikipedia_tool = Tool.from_langchain(load_tools(["wikipedia"])[0])
|
| 62 |
wikipedia_tool.top_k_results=3
|
|
|
|
| 56 |
from smolagents import CodeAgent, OpenAIServerModel, DuckDuckGoSearchTool, FinalAnswerTool, VisitWebpageTool, MCPClient
|
| 57 |
|
| 58 |
# import additional tool from langchain @ https://docs.langchain.com/oss/python/integrations/tools
|
| 59 |
+
from langchain_community.agent_toolkits import load_tools
|
| 60 |
from smolagents import Tool
|
| 61 |
wikipedia_tool = Tool.from_langchain(load_tools(["wikipedia"])[0])
|
| 62 |
wikipedia_tool.top_k_results=3
|