Klass777 commited on
Commit
c89ab42
·
verified ·
1 Parent(s): c46147c

Change CodeAgent to ToolCallingAgent

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  import requests
4
  import pandas as pd
5
  from smolagents import CodeAgent, OpenAIServerModel, DuckDuckGoSearchTool, VisitWebpageTool, tool, \
6
- FinalAnswerTool, PythonInterpreterTool, SpeechToTextTool
7
  import yaml
8
  import importlib
9
  from io import BytesIO
@@ -86,7 +86,7 @@ class BasicAgent:
86
  def __init__(self):
87
  model = OpenAIServerModel(api_key=os.environ.get("OPENAI_API_KEY"), model_id="gpt-4o")
88
 
89
- self.code_agent = CodeAgent(
90
  tools=[PythonInterpreterTool(), DuckDuckGoSearchTool(), VisitWebpageTool(), SpeechToTextTool(),
91
  get_youtube_transcript,
92
  FinalAnswerTool()],
 
3
  import requests
4
  import pandas as pd
5
  from smolagents import CodeAgent, OpenAIServerModel, DuckDuckGoSearchTool, VisitWebpageTool, tool, \
6
+ FinalAnswerTool, PythonInterpreterTool, SpeechToTextTool, ToolCallingAgent
7
  import yaml
8
  import importlib
9
  from io import BytesIO
 
86
  def __init__(self):
87
  model = OpenAIServerModel(api_key=os.environ.get("OPENAI_API_KEY"), model_id="gpt-4o")
88
 
89
+ self.code_agent = ToolCallingAgent(
90
  tools=[PythonInterpreterTool(), DuckDuckGoSearchTool(), VisitWebpageTool(), SpeechToTextTool(),
91
  get_youtube_transcript,
92
  FinalAnswerTool()],