alisamak commited on
Commit
618dd54
·
verified ·
1 Parent(s): e22e70b

Update basic_agent.py

Browse files
Files changed (1) hide show
  1. basic_agent.py +4 -0
basic_agent.py CHANGED
@@ -11,6 +11,7 @@ class BasicAgent:
11
  "analyze_youtube_video": (analyze_youtube_video, "url"),
12
  "extract_number_from_text": (extract_number_from_text, "text"),
13
  "search_wikipedia": (search_wikipedia, "query"),
 
14
  }
15
 
16
  def __call__(self, question: str) -> str:
@@ -32,6 +33,9 @@ class BasicAgent:
32
  elif "wikipedia" in q or "encyclopedia" in q or "who is" in q:
33
  return self.tool_registry["search_wikipedia"]
34
 
 
 
 
35
  return self.tool_registry["extract_number_from_text"] # fallback
36
 
37
 
 
11
  "analyze_youtube_video": (analyze_youtube_video, "url"),
12
  "extract_number_from_text": (extract_number_from_text, "text"),
13
  "search_wikipedia": (search_wikipedia, "query"),
14
+ "check_commutativity_table": (check_commutativity_table, "table_text"),
15
  }
16
 
17
  def __call__(self, question: str) -> str:
 
33
  elif "wikipedia" in q or "encyclopedia" in q or "who is" in q:
34
  return self.tool_registry["search_wikipedia"]
35
 
36
+ elif "commutative" in q or "counter-examples" in q:
37
+ return self.tool_registry["check_commutativity_table"]
38
+
39
  return self.tool_registry["extract_number_from_text"] # fallback
40
 
41