mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 15:23:51 +00:00
made changes to tavily_search, simplified config logic
This commit is contained in:
parent
f997a11ac1
commit
f81b8c53c2
1 changed files with 2 additions and 2 deletions
|
@ -70,9 +70,9 @@ class TavilySearchToolRuntimeImpl(ToolGroupsProtocolPrivate, ToolRuntime, NeedsR
|
||||||
async def invoke_tool(self, tool_name: str, kwargs: dict[str, Any]) -> ToolInvocationResult:
|
async def invoke_tool(self, tool_name: str, kwargs: dict[str, Any]) -> ToolInvocationResult:
|
||||||
api_key = self._get_api_key()
|
api_key = self._get_api_key()
|
||||||
|
|
||||||
httpx.Timeout(timeout=self.config.timeout, connect=self.config.connect_timeout)
|
timeout = httpx.Timeout(timeout=self.config.timeout)
|
||||||
|
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient(timeout=timeout) as client:
|
||||||
response = await client.post(
|
response = await client.post(
|
||||||
"https://api.tavily.com/search",
|
"https://api.tavily.com/search",
|
||||||
json={"api_key": api_key, "query": kwargs["query"]},
|
json={"api_key": api_key, "query": kwargs["query"]},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue