more commits

This commit is contained in:
anigasan 2025-07-06 18:44:27 -07:00
parent ef332c296e
commit e679cd0261
34 changed files with 68 additions and 2 deletions

View file

@ -10,12 +10,16 @@ Tavily Search tool for AI-optimized web search with structured results.
|-------|------|----------|---------|-------------| |-------|------|----------|---------|-------------|
| `api_key` | `str \| None` | No | | The Tavily Search API Key | | `api_key` | `str \| None` | No | | The Tavily Search API Key |
| `max_results` | `<class 'int'>` | No | 3 | The maximum number of results to return | | `max_results` | `<class 'int'>` | No | 3 | The maximum number of results to return |
| `timeout` | `<class 'float'>` | No | 30.0 | HTTP request timeout for the API |
| `connect_timeout` | `<class 'float'>` | No | 10.0 | HTTP connection timeout in seconds for the API |
## Sample Configuration ## Sample Configuration
```yaml ```yaml
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
``` ```

View file

@ -32,6 +32,6 @@ class TavilySearchToolConfig(BaseModel):
return { return {
"api_key": "${env.TAVILY_SEARCH_API_KEY:=}", "api_key": "${env.TAVILY_SEARCH_API_KEY:=}",
"max_results": 3, "max_results": 3,
"timeout:" 30.0, "timeout": 30.0,
"connect_timeout": 10.0, "connect_timeout": 10.0,
} }

View file

@ -70,7 +70,7 @@ 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()
timeout = https.Timeout(timeout=self.config.timeout, connect=self.config.connect_timeout) httpx.Timeout(timeout=self.config.timeout, connect=self.config.connect_timeout)
async with httpx.AsyncClient() as client: async with httpx.AsyncClient() as client:
response = await client.post( response = await client.post(

View file

@ -85,6 +85,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -91,6 +91,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -89,6 +89,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -92,6 +92,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -88,6 +88,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -105,6 +105,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: wolfram-alpha - provider_id: wolfram-alpha
provider_type: remote::wolfram-alpha provider_type: remote::wolfram-alpha
config: config:

View file

@ -100,6 +100,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: wolfram-alpha - provider_id: wolfram-alpha
provider_type: remote::wolfram-alpha provider_type: remote::wolfram-alpha
config: config:

View file

@ -91,6 +91,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -96,6 +96,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -91,6 +91,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -96,6 +96,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -91,6 +91,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -101,6 +101,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -106,6 +106,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -96,6 +96,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -107,6 +107,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -105,6 +105,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -115,6 +115,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -96,6 +96,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: wolfram-alpha - provider_id: wolfram-alpha
provider_type: remote::wolfram-alpha provider_type: remote::wolfram-alpha
config: config:

View file

@ -91,6 +91,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: wolfram-alpha - provider_id: wolfram-alpha
provider_type: remote::wolfram-alpha provider_type: remote::wolfram-alpha
config: config:

View file

@ -65,6 +65,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -100,6 +100,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -93,6 +93,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -70,6 +70,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -162,6 +162,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -91,6 +91,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -90,6 +90,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -96,6 +96,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -91,6 +91,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -95,6 +95,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}

View file

@ -92,6 +92,8 @@ providers:
config: config:
api_key: ${env.TAVILY_SEARCH_API_KEY:=} api_key: ${env.TAVILY_SEARCH_API_KEY:=}
max_results: 3 max_results: 3
timeout: 30.0
connect_timeout: 10.0
- provider_id: rag-runtime - provider_id: rag-runtime
provider_type: inline::rag-runtime provider_type: inline::rag-runtime
config: {} config: {}