Enable Bing search (#59)

* add tool for bing search

* simplify search tool and enable configuration for search engine

* dropped commented code

---------

Co-authored-by: Hardik Shah <hjshah@fb.com>
This commit is contained in:
Hardik Shah 2024-09-10 12:34:29 -07:00 committed by GitHub
parent 2b63074676
commit a11d92601b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 87 additions and 18 deletions

View file

@ -710,7 +710,7 @@ class ChatAgent(ShieldRunnerMixin):
def _get_tools(self) -> List[ToolDefinition]:
ret = []
for t in self.agent_config.tools:
if isinstance(t, BraveSearchToolDefinition):
if isinstance(t, SearchToolDefinition):
ret.append(ToolDefinition(tool_name=BuiltinTool.brave_search))
elif isinstance(t, WolframAlphaToolDefinition):
ret.append(ToolDefinition(tool_name=BuiltinTool.wolfram_alpha))