abhinav393 commited on
Commit
f03b60a
·
verified ·
1 Parent(s): 205150c

Removed wiki search

Browse files

I intend to improve it before running

Files changed (1) hide show
  1. app.py +11 -12
app.py CHANGED
@@ -20,16 +20,16 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
20
  return "What magic will you build ?"
21
 
22
 
23
- @tool
24
- def wikipedia_summary(query: str) -> str:
25
- """A tool that fetches a short summary from Wikipedia for a given topic.
26
- Args:
27
- query: The topic to search for.
28
- """
29
- try:
30
- return wikipedia.summary(query, sentences=2)
31
- except Exception as e:
32
- return f"Error fetching Wikipedia summary: {str(e)}"
33
 
34
 
35
  @tool
@@ -119,8 +119,7 @@ agent = CodeAgent(
119
  tools=[
120
  final_answer,
121
  calculate_bmi,
122
- get_current_time_in_timezone,
123
- wikipedia_summary
124
  ], ## add your tools here (don't remove final answer)
125
  max_steps=6,
126
  verbosity_level=1,
 
20
  return "What magic will you build ?"
21
 
22
 
23
+ # @tool
24
+ # def wikipedia_summary(query: str) -> str:
25
+ # """A tool that fetches a short summary from Wikipedia for a given topic.
26
+ # Args:
27
+ # query: The topic to search for.
28
+ # """
29
+ # try:
30
+ # return wikipedia.summary(query, sentences=2)
31
+ # except Exception as e:
32
+ # return f"Error fetching Wikipedia summary: {str(e)}"
33
 
34
 
35
  @tool
 
119
  tools=[
120
  final_answer,
121
  calculate_bmi,
122
+ get_current_time_in_timezone
 
123
  ], ## add your tools here (don't remove final answer)
124
  max_steps=6,
125
  verbosity_level=1,