lwant commited on
Commit
fa2bac9
Β·
1 Parent(s): d8d74ed

Make `run_and_submit_all` asynchronous, update imports, and add telemetry initialization

Browse files
Files changed (1) hide show
  1. src/gaia_solving_agent/tools.py +11 -0
src/gaia_solving_agent/tools.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from tavily import AsyncTavilyClient
2
+
3
+ from gaia_solving_agent import TAVILY_API_KEY
4
+
5
+
6
+ async def tavily_search_web(query: str) -> str:
7
+ """Useful for using the web to answer questions."""
8
+ if TAVILY_API_KEY is None or "x" in TAVILY_API_KEY:
9
+ raise ValueError("Tavily API key not set.")
10
+ client = AsyncTavilyClient(api_key=TAVILY_API_KEY)
11
+ return str(await client.search(query))