Update agent.py
Browse files
agent.py
CHANGED
@@ -77,9 +77,9 @@ def extract_excel_total_food_sales(file_path: str) -> str:
|
|
77 |
|
78 |
# Assemble tools with proper descriptions
|
79 |
TOOLS = [
|
80 |
-
FunctionTool.from_defaults(search_wikipedia, name="search_wikipedia", description="Search Wikipedia for facts and lists."),
|
81 |
-
FunctionTool.from_defaults(run_python_code, name="run_python", description="Run Python code for logic, math, or set processing."),
|
82 |
-
FunctionTool.from_defaults(get_youtube_transcript, name="get_youtube_transcript", description="Fetch transcript from YouTube video by URL."),
|
83 |
FunctionTool.from_defaults(transcribe_audio, name="transcribe_audio", description="Transcribe MP3 audio file using Whisper."),
|
84 |
FunctionTool.from_defaults(extract_excel_total_food_sales, name="extract_excel_total_food_sales", description="Sum total sales from Excel where category is 'food'.")
|
85 |
]
|
@@ -90,7 +90,9 @@ llm = OpenAI(model="gpt-4")
|
|
90 |
agent = FunctionAgent(
|
91 |
tools=TOOLS,
|
92 |
llm=llm,
|
93 |
-
|
|
|
|
|
94 |
system_prompt="""
|
95 |
You are a highly capable AI agent taking the GAIA benchmark test.
|
96 |
|
|
|
77 |
|
78 |
# Assemble tools with proper descriptions
|
79 |
TOOLS = [
|
80 |
+
FunctionTool.from_defaults(search_wikipedia, name="search_wikipedia", description="Search Wikipedia for facts and lists.", return_direct=True),
|
81 |
+
FunctionTool.from_defaults(run_python_code, name="run_python", description="Run Python code for logic, math, or set processing.", return_direct=True),
|
82 |
+
FunctionTool.from_defaults(get_youtube_transcript, name="get_youtube_transcript", description="Fetch transcript from YouTube video by URL.", return_direct=True),
|
83 |
FunctionTool.from_defaults(transcribe_audio, name="transcribe_audio", description="Transcribe MP3 audio file using Whisper."),
|
84 |
FunctionTool.from_defaults(extract_excel_total_food_sales, name="extract_excel_total_food_sales", description="Sum total sales from Excel where category is 'food'.")
|
85 |
]
|
|
|
90 |
agent = FunctionAgent(
|
91 |
tools=TOOLS,
|
92 |
llm=llm,
|
93 |
+
system_prompt="...",
|
94 |
+
max_iterations=5,
|
95 |
+
verbose=True
|
96 |
system_prompt="""
|
97 |
You are a highly capable AI agent taking the GAIA benchmark test.
|
98 |
|