RCaz commited on
Commit
85dd0e2
·
verified ·
1 Parent(s): b692e8e

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -1
agent.py CHANGED
@@ -81,6 +81,7 @@ class TestAgent:
81
  wikipedia_tool, # tool from langchain with extra parmaeters
82
  #youtube_tools, # tool from MCP server
83
  FinalAnswerTool()],
 
84
  model=model,
85
  max_steps=3,
86
  verbosity_level=2
@@ -89,6 +90,6 @@ class TestAgent:
89
  def __call__(self, question: str) -> str:
90
 
91
  print(f"Agent received question (first 50 chars): {question[:50]}...")
92
- answer = self.agent.invoke(question)
93
  print(f"Agent returning his answer: {answer}")
94
  return answer
 
81
  wikipedia_tool, # tool from langchain with extra parmaeters
82
  #youtube_tools, # tool from MCP server
83
  FinalAnswerTool()],
84
+ additional_authorized_imports=["pandas"],
85
  model=model,
86
  max_steps=3,
87
  verbosity_level=2
 
90
  def __call__(self, question: str) -> str:
91
 
92
  print(f"Agent received question (first 50 chars): {question[:50]}...")
93
+ answer = self.agent.run(question)
94
  print(f"Agent returning his answer: {answer}")
95
  return answer