cowrycode commited on
Commit
d2b051e
·
verified ·
1 Parent(s): c7385e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -30,27 +30,27 @@ class BasicAgent:
30
  provider="auto",
31
  max_iterations=10
32
  )
33
- # self.agent = AgentWorkflow.from_tools_or_functions(
34
- # [wikipedia_search_tool, youtube_transcript_tool, youtube_transcript_snippet_tool,
35
- # round_to_two_decimals_tool, text_inverter_tool, google_web_search_tool],
36
- # llm=self.llm
37
- # )
38
-
39
- self.tools = [
40
- wikipedia_search_tool,
41
- youtube_transcript_tool,
42
- youtube_transcript_snippet_tool,
43
- round_to_two_decimals_tool,
44
- text_inverter_tool,
45
- google_web_search_tool
46
- ]
47
-
48
- self.agent = ReActAgent.from_tools(
49
- tools=self.tools,
50
- llm=self.llm,
51
- verbose=True
52
  )
53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  async def run(self, question: str) -> str:
55
  print(f"Agent received question (first 50 chars): {question[:50]}...")
56
  answer = await self.agent.run(question)
 
30
  provider="auto",
31
  max_iterations=10
32
  )
33
+ self.agent = AgentWorkflow.from_tools_or_functions(
34
+ [wikipedia_search_tool, youtube_transcript_tool, youtube_transcript_snippet_tool,
35
+ round_to_two_decimals_tool, text_inverter_tool, google_web_search_tool],
36
+ llm=self.llm
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  )
38
 
39
+ # self.tools = [
40
+ # wikipedia_search_tool,
41
+ # youtube_transcript_tool,
42
+ # youtube_transcript_snippet_tool,
43
+ # round_to_two_decimals_tool,
44
+ # text_inverter_tool,
45
+ # google_web_search_tool
46
+ # ]
47
+
48
+ # self.agent = ReActAgent.from_tools(
49
+ # tools=self.tools,
50
+ # llm=self.llm,
51
+ # verbose=True
52
+ # )
53
+
54
  async def run(self, question: str) -> str:
55
  print(f"Agent received question (first 50 chars): {question[:50]}...")
56
  answer = await self.agent.run(question)