Kai Jennissen
commited on
minor fixes
Browse files
agent.py
CHANGED
|
@@ -4,7 +4,6 @@ from smolagents import (
|
|
| 4 |
DuckDuckGoSearchTool,
|
| 5 |
VisitWebpageTool,
|
| 6 |
InferenceClientModel,
|
| 7 |
-
WikipediaSearchTool,
|
| 8 |
)
|
| 9 |
from dotenv import load_dotenv
|
| 10 |
from tracing import setup_tracing
|
|
@@ -46,9 +45,9 @@ def get_agent():
|
|
| 46 |
|
| 47 |
# Create web agent
|
| 48 |
web_agent = ToolCallingAgent(
|
| 49 |
-
tools=[DuckDuckGoSearchTool(), VisitWebpageTool()
|
| 50 |
model=llm_qwen,
|
| 51 |
-
max_steps=
|
| 52 |
name="Web_Agent",
|
| 53 |
description="A web agent that can search the web and visit webpages.",
|
| 54 |
)
|
|
@@ -58,7 +57,9 @@ def get_agent():
|
|
| 58 |
tools=[],
|
| 59 |
managed_agents=[web_agent],
|
| 60 |
model=llm_deepseek,
|
| 61 |
-
max_steps=
|
|
|
|
|
|
|
| 62 |
)
|
| 63 |
return manager_agent
|
| 64 |
|
|
|
|
| 4 |
DuckDuckGoSearchTool,
|
| 5 |
VisitWebpageTool,
|
| 6 |
InferenceClientModel,
|
|
|
|
| 7 |
)
|
| 8 |
from dotenv import load_dotenv
|
| 9 |
from tracing import setup_tracing
|
|
|
|
| 45 |
|
| 46 |
# Create web agent
|
| 47 |
web_agent = ToolCallingAgent(
|
| 48 |
+
tools=[DuckDuckGoSearchTool(), VisitWebpageTool()],
|
| 49 |
model=llm_qwen,
|
| 50 |
+
max_steps=3,
|
| 51 |
name="Web_Agent",
|
| 52 |
description="A web agent that can search the web and visit webpages.",
|
| 53 |
)
|
|
|
|
| 57 |
tools=[],
|
| 58 |
managed_agents=[web_agent],
|
| 59 |
model=llm_deepseek,
|
| 60 |
+
max_steps=3,
|
| 61 |
+
planning_interval=10,
|
| 62 |
+
additional_authorized_imports=["pandas", "numpy"],
|
| 63 |
)
|
| 64 |
return manager_agent
|
| 65 |
|
app.py
CHANGED
|
@@ -12,7 +12,7 @@ load_dotenv()
|
|
| 12 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 13 |
|
| 14 |
# Initialize tracing - smolagents instrumentation will handle the rest
|
| 15 |
-
trace_provider = initialize_tracing(
|
| 16 |
|
| 17 |
|
| 18 |
# --- Basic Agent Definition ---
|
|
|
|
| 12 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 13 |
|
| 14 |
# Initialize tracing - smolagents instrumentation will handle the rest
|
| 15 |
+
trace_provider = initialize_tracing(provider="phoenix")
|
| 16 |
|
| 17 |
|
| 18 |
# --- Basic Agent Definition ---
|