alisamak commited on
Commit
acc56d5
·
verified ·
1 Parent(s): 0dfb3a0

Update basic_agent.py

Browse files
Files changed (1) hide show
  1. basic_agent.py +13 -13
basic_agent.py CHANGED
@@ -9,17 +9,17 @@ class BasicAgent:
9
  except Exception as e:
10
  return f"Error: {e}"
11
 
12
- def select_tool(self, question: str):
13
- q = question.lower()
14
-
15
- if "youtube.com" in q or "youtu.be" in q or "in the video" in q:
16
- return analyze_youtube_video # direct reference, not index
17
-
18
- elif "how many" in q or "number of" in q:
19
- return extract_number_from_text
20
-
21
- elif "wikipedia" in q or "encyclopedia" in q or "who is" in q:
22
- return search_wikipedia
23
-
24
- return extract_number_from_text # fallback tool
25
 
 
9
  except Exception as e:
10
  return f"Error: {e}"
11
 
12
+ def select_tool(self, question: str):
13
+ q = question.lower()
14
+
15
+ if "youtube.com" in q or "youtu.be" in q or "in the video" in q:
16
+ return analyze_youtube_video # direct reference, not index
17
+
18
+ elif "how many" in q or "number of" in q:
19
+ return extract_number_from_text
20
+
21
+ elif "wikipedia" in q or "encyclopedia" in q or "who is" in q:
22
+ return search_wikipedia
23
+
24
+ return extract_number_from_text # fallback tool
25