Spaces:
Paused
Paused
Update agents.py
Browse files
agents.py
CHANGED
|
@@ -1,13 +1,12 @@
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
-
from langchain.agents import load_tools
|
| 4 |
from openai import OpenAI
|
| 5 |
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
| 6 |
from phoenix.otel import register
|
| 7 |
from smolagents import (
|
| 8 |
CodeAgent,
|
| 9 |
OpenAIServerModel,
|
| 10 |
-
Tool,
|
| 11 |
DuckDuckGoSearchTool,
|
| 12 |
WikipediaSearchTool
|
| 13 |
)
|
|
@@ -30,8 +29,8 @@ tracer_provider = register(
|
|
| 30 |
SmolagentsInstrumentor().instrument(tracer_provider = tracer_provider)
|
| 31 |
|
| 32 |
def run_gaia(question, file_name):
|
| 33 |
-
search_tool = Tool.from_langchain(load_tools(["serpapi"])[0])
|
| 34 |
-
wikipedia_tool = Tool.from_langchain(load_tools(["wikipedia"])[0])
|
| 35 |
|
| 36 |
web_agent = CodeAgent(
|
| 37 |
description = "Runs web searches for you. Give it your query as an argument.",
|
|
|
|
| 1 |
import os
|
| 2 |
|
| 3 |
+
#from langchain.agents import load_tools
|
| 4 |
from openai import OpenAI
|
| 5 |
from openinference.instrumentation.smolagents import SmolagentsInstrumentor
|
| 6 |
from phoenix.otel import register
|
| 7 |
from smolagents import (
|
| 8 |
CodeAgent,
|
| 9 |
OpenAIServerModel,
|
|
|
|
| 10 |
DuckDuckGoSearchTool,
|
| 11 |
WikipediaSearchTool
|
| 12 |
)
|
|
|
|
| 29 |
SmolagentsInstrumentor().instrument(tracer_provider = tracer_provider)
|
| 30 |
|
| 31 |
def run_gaia(question, file_name):
|
| 32 |
+
#search_tool = Tool.from_langchain(load_tools(["serpapi"])[0])
|
| 33 |
+
#wikipedia_tool = Tool.from_langchain(load_tools(["wikipedia"])[0])
|
| 34 |
|
| 35 |
web_agent = CodeAgent(
|
| 36 |
description = "Runs web searches for you. Give it your query as an argument.",
|