JabrilJacobs commited on
Commit
398d4fc
·
verified ·
1 Parent(s): 8abdc5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -66,12 +66,19 @@ class NewAgent:
66
  func=read_excel_file,
67
  description="Reads an Excel file and returns structured information about its contents."
68
  )
 
 
 
 
 
 
69
  # Generate the chat interface, including the tools
70
  tools = [
71
  search_tool,
72
  hub_stats_tool,
73
  image_analysis_tool,
74
  read_excel_tool,
 
75
  ]
76
  # llm = ChatOpenAI(model="gpt-4o")
77
  llm = ChatOpenAI(model="gpt-4.1")
 
66
  func=read_excel_file,
67
  description="Reads an Excel file and returns structured information about its contents."
68
  )
69
+ # Initialize the Python Execution tool
70
+ python_exec_tool = Tool(
71
+ name="execute_python_code",
72
+ func=execute_python_code,
73
+ description="Executes a Python file and returns its output. Input should be the path to a Python file."
74
+ )
75
  # Generate the chat interface, including the tools
76
  tools = [
77
  search_tool,
78
  hub_stats_tool,
79
  image_analysis_tool,
80
  read_excel_tool,
81
+ python_exec_tool,
82
  ]
83
  # llm = ChatOpenAI(model="gpt-4o")
84
  llm = ChatOpenAI(model="gpt-4.1")