Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,12 +61,31 @@ class BasicAgent:
|
|
| 61 |
)
|
| 62 |
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
self.simple_agent = CodeAgent(
|
| 65 |
tools=[DuckDuckGoSearchTool()],
|
| 66 |
model=self.model,
|
| 67 |
add_base_tools=True, # Add any additional base tools
|
| 68 |
-
planning_interval=
|
| 69 |
-
max_steps=
|
| 70 |
additional_authorized_imports=["*"],
|
| 71 |
name="simple_agent",
|
| 72 |
description="You are agent that seeks answer to the question and give it."
|
|
@@ -74,12 +93,12 @@ class BasicAgent:
|
|
| 74 |
|
| 75 |
|
| 76 |
self.agent = CodeAgent(
|
| 77 |
-
managed_agents=[self.simple_agent],
|
| 78 |
tools=[],
|
| 79 |
model=self.model,
|
| 80 |
add_base_tools=True, # Add any additional base tools
|
| 81 |
-
|
| 82 |
-
max_steps=
|
| 83 |
additional_authorized_imports=["*"],
|
| 84 |
description="You are final agent that validates, that answer to the query is true and retruns final answer.",
|
| 85 |
name="judger_agent",
|
|
|
|
| 61 |
)
|
| 62 |
|
| 63 |
|
| 64 |
+
self.model_open_router = LiteLLMModel(
|
| 65 |
+
api_base="https://openrouter.ai/api/v1",
|
| 66 |
+
model_id="openrouter/google/gemma-3-27b-it:free",
|
| 67 |
+
api_key="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",
|
| 68 |
+
provider=None,
|
| 69 |
+
# header={"Authorization": "Bearer sk_sFVMiXN3X0o9SvD0IwrEm5Sd9tzWTxdjoOURDhwVEss"}
|
| 70 |
+
)
|
| 71 |
+
|
| 72 |
+
self.multimodal_agent = CodeAgent(
|
| 73 |
+
tools=[],
|
| 74 |
+
model=self.model_open_router,
|
| 75 |
+
add_base_tools=True, # Add any additional base tools
|
| 76 |
+
max_steps=2,
|
| 77 |
+
additional_authorized_imports=["*"],
|
| 78 |
+
name="multimodal_agent",
|
| 79 |
+
description="You are agent that could use multimodal data. But don't use this agent often"
|
| 80 |
+
)
|
| 81 |
+
|
| 82 |
+
|
| 83 |
self.simple_agent = CodeAgent(
|
| 84 |
tools=[DuckDuckGoSearchTool()],
|
| 85 |
model=self.model,
|
| 86 |
add_base_tools=True, # Add any additional base tools
|
| 87 |
+
planning_interval=1, # Enable planning every 3 steps
|
| 88 |
+
max_steps=3,
|
| 89 |
additional_authorized_imports=["*"],
|
| 90 |
name="simple_agent",
|
| 91 |
description="You are agent that seeks answer to the question and give it."
|
|
|
|
| 93 |
|
| 94 |
|
| 95 |
self.agent = CodeAgent(
|
| 96 |
+
managed_agents=[self.simple_agent, self.multimodal_agent],
|
| 97 |
tools=[],
|
| 98 |
model=self.model,
|
| 99 |
add_base_tools=True, # Add any additional base tools
|
| 100 |
+
planning_interval=2, # Enable planning every 3 steps
|
| 101 |
+
max_steps=5,
|
| 102 |
additional_authorized_imports=["*"],
|
| 103 |
description="You are final agent that validates, that answer to the query is true and retruns final answer.",
|
| 104 |
name="judger_agent",
|