mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-29 07:14:20 +00:00
commits
This commit is contained in:
parent
f288f92f88
commit
8c4f489c5d
1 changed files with 4 additions and 5 deletions
|
@ -70,10 +70,9 @@ class TavilySearchToolRuntimeImpl(ToolGroupsProtocolPrivate, ToolRuntime, NeedsR
|
|||
async def invoke_tool(self, tool_name: str, kwargs: dict[str, Any]) -> ToolInvocationResult:
|
||||
api_key = self._get_api_key()
|
||||
|
||||
# Configure timeout for external API calls using config values
|
||||
timeout = httpx.Timeout(timeout=self.config.timeout, connect=self.config.connect_timeout)
|
||||
timeout = https.Timeout(timeout=self.config.timeout, connect=self.config.connect_timeout)
|
||||
|
||||
async with httpx.AsyncClient(timeout=timeout) as client:
|
||||
async with httpx.AsyncClient() as client:
|
||||
response = await client.post(
|
||||
"https://api.tavily.com/search",
|
||||
json={"api_key": api_key, "query": kwargs["query"]},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue