Spaces:
Sleeping
Sleeping
| from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, tool, VisitWebpageTool, Tool, FinalAnswerTool, WebSearchTool, WikipediaSearchTool, GoogleSearchTool | |
| from calculator_tool import CalculatorTool | |
| import os | |
| import selenium | |
| import numpy as np | |
| import time | |
| import datetime | |
| from typing import List, Dict, Any, Optional | |
| import tempfile | |
| import re | |
| import json | |
| import requests | |
| from urllib.parse import urlparse | |
| #Creating multyagent structure | |
| web_agent = CodeAgent( | |
| tools=[ | |
| DuckDuckGoSearchTool(), | |
| VisitWebpageTool(), | |
| FinalAnswerTool() | |
| ], | |
| model=InferenceClientModel(), | |
| name="web_agent", | |
| description="Brows the web to find information", | |
| max_steps=10, | |
| verbosity_level=0, | |
| ) | |
| manager_agent = CodeAgent( | |
| model=InferenceClientModel("deepseek-ai/DeepSeek-R1", provider="together", max_tokens=8096), | |
| managed_agent=[web_agent], | |
| additional_authorized_imports=[ | |
| "datetime", | |
| "pandas", | |
| "numpy", | |
| "json" | |
| ], | |
| planning_intervals=5, | |
| verbosity_level=2, | |
| max_steps=15, | |
| ) | |