Shivangsinha commited on
Commit
ce1028f
·
verified ·
1 Parent(s): c7728b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -4,7 +4,7 @@ import requests
4
  import inspect
5
  import pandas as pd
6
  from smolagents import (
7
- CodeAgent,
8
  OpenAIServerModel,
9
  DuckDuckGoSearchTool,
10
  WikipediaSearchTool,
@@ -40,11 +40,10 @@ class BasicAgent:
40
  PythonInterpreterTool(),
41
  get_current_date_time,
42
  ]
43
- self.agent = CodeAgent(
44
  tools=tools,
45
  model=model,
46
  max_steps=10,
47
- additional_authorized_imports=["math", "datetime", "re", "json", "collections", "itertools", "statistics"],
48
  )
49
 
50
  def __call__(self, question: str) -> str:
 
4
  import inspect
5
  import pandas as pd
6
  from smolagents import (
7
+ ToolCallingAgent,
8
  OpenAIServerModel,
9
  DuckDuckGoSearchTool,
10
  WikipediaSearchTool,
 
40
  PythonInterpreterTool(),
41
  get_current_date_time,
42
  ]
43
+ self.agent = ToolCallingAgent(
44
  tools=tools,
45
  model=model,
46
  max_steps=10,
 
47
  )
48
 
49
  def __call__(self, question: str) -> str: