Popline commited on
Commit
8e66ea0
·
verified ·
1 Parent(s): efe750f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -5,7 +5,7 @@ import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
  from llama_index.tools.wikipedia import WikipediaToolSpec
8
- from llama_index.agent.openai import OpenAIAgent
9
 
10
  from Gradio_UI import GradioUI
11
 
@@ -23,9 +23,9 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
23
 
24
  tool_spec = WikipediaToolSpec()
25
 
26
- agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())
27
 
28
- agent.chat("Who is Ben Afflecks spouse?")
29
 
30
 
31
  @tool
@@ -65,7 +65,7 @@ with open("prompts.yaml", 'r') as stream:
65
 
66
  agent = CodeAgent(
67
  model=model,
68
- tools=[final_answer, get_current_time_in_timezone, image_generation_tool, tool_spec, agent], ## add your tools here (don't remove final answer)
69
  max_steps=6,
70
  verbosity_level=1,
71
  grammar=None,
 
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
  from llama_index.tools.wikipedia import WikipediaToolSpec
8
+ #from llama_index.agent.openai import OpenAIAgent
9
 
10
  from Gradio_UI import GradioUI
11
 
 
23
 
24
  tool_spec = WikipediaToolSpec()
25
 
26
+ #agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())
27
 
28
+ #agent.chat("Who is Ben Afflecks spouse?")
29
 
30
 
31
  @tool
 
65
 
66
  agent = CodeAgent(
67
  model=model,
68
+ tools=[final_answer, get_current_time_in_timezone, image_generation_tool, tool_spec], ## add your tools here (don't remove final answer)
69
  max_steps=6,
70
  verbosity_level=1,
71
  grammar=None,