Spaces:
Runtime error
Runtime error
File size: 1,742 Bytes
ac0f9ba |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
from smolagents import load_tool, Tool, tool, ToolCallingAgent, CodeAgent, GoogleSearchTool,FinalAnswerTool,PythonInterpreterTool , LiteLLMModel, VisitWebpageTool, DuckDuckGoSearchTool
from litellm import completion
from langchain.agents import load_tools
from langchain_community.tools.tavily_search import TavilySearchResults
import os
from src.final_assignment_template.models import openrouter_qwenCoder_model, modelLiteLLm
from src.final_assignment_template.tools import travily_tool, Video_understanding_tool, image_understanding_tool, get_task_file
# (Keep Constants as is)
# --- Constants ---
web_agent = CodeAgent(
model=openrouter_qwenCoder_model,
tools=[
# GoogleSearchTool(provider="serper"),
# DuckDuckGoSearchTool(max_results=10),
travily_tool,
VisitWebpageTool(),
],
name="web_agent",
description="""Browses the web to find information""",
verbosity_level=1,
max_steps=5,
)
manager_agent = CodeAgent(
name="Task_Agent",
description="""You will be provided a task and you need to verify before giving final answer
You can perform tasks which are text and image based, skip all other
""",
model=modelLiteLLm,
tools=[PythonInterpreterTool(),Video_understanding_tool,image_understanding_tool,get_task_file],
managed_agents=[web_agent],
additional_authorized_imports=[
"json",
"pandas",
"numpy",
"markdown"
'math', 'statistics', 're', 'unicodedata', 'random',
'datetime', 'queue', 'time', 'collections', 'stat', 'itertools',
'PIL','requests'
],
planning_interval=3,
verbosity_level=1,
# final_answer_checks=[check_reasoning_and_plot],
max_steps=5,
)
|