lwant's picture
Replace unused Wikipedia tool spec and integrate `WikipediaToolSpec` with a dedicated `wikipedia_agent`.
4f304eb
raw
history blame
397 Bytes
from tavily import AsyncTavilyClient
from gaia_solving_agent import TAVILY_API_KEY
async def tavily_search_web(query: str) -> str:
"""Useful for using the web to answer questions."""
if TAVILY_API_KEY is None or "x" in TAVILY_API_KEY:
raise ValueError("Tavily API key not set.")
client = AsyncTavilyClient(api_key=TAVILY_API_KEY)
return str(await client.search(query))