dawid-lorek commited on
Commit
a2c31da
·
verified ·
1 Parent(s): 52050f1

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -4
agent.py CHANGED
@@ -3,7 +3,7 @@
3
  import os
4
  import asyncio
5
  from llama_index.llms.openai import OpenAI
6
- from llama_index.core.agent.workflow import FunctionAgent
7
  from llama_index.core.tools import FunctionTool
8
 
9
  from langchain_community.utilities.wikipedia import WikipediaAPIWrapper
@@ -87,11 +87,9 @@ TOOLS = [
87
  # Create agent with FunctionAgent (compatible with run)
88
  llm = OpenAI(model="gpt-4")
89
 
90
- agent = FunctionAgent(
91
- max_iterations=5,
92
  tools=TOOLS,
93
  llm=llm,
94
- verbose=True,
95
  system_prompt="""
96
  You are a highly capable AI agent taking the GAIA benchmark test.
97
 
 
3
  import os
4
  import asyncio
5
  from llama_index.llms.openai import OpenAI
6
+ from llama_index.core.agent import FunctionCallingAgent
7
  from llama_index.core.tools import FunctionTool
8
 
9
  from langchain_community.utilities.wikipedia import WikipediaAPIWrapper
 
87
  # Create agent with FunctionAgent (compatible with run)
88
  llm = OpenAI(model="gpt-4")
89
 
90
+ agent = FunctionCallingAgent.from_tools(
 
91
  tools=TOOLS,
92
  llm=llm,
 
93
  system_prompt="""
94
  You are a highly capable AI agent taking the GAIA benchmark test.
95