Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/tools-custom/openapi-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The process involves these main steps when you use `OpenAPIToolset`:

4. **`RestApiTool` Functionality**: Each generated `RestApiTool`:
* **Schema Generation**: Dynamically creates a `FunctionDeclaration` based on the operation's parameters and request body. This schema tells the LLM how to call the tool (what arguments are expected).
* **Execution**: When called by the LLM, it constructs the correct HTTP request (URL, headers, query params, body) using the arguments provided by the LLM and the details from the OpenAPI spec. It handles authentication (if configured) and executes the API call using the `requests` library.
* **Execution**: When called by the LLM, it constructs the correct HTTP request (URL, headers, query params, body) using the arguments provided by the LLM and the details from the OpenAPI spec. It handles authentication (if configured) and executes the API call asynchronously using the `httpx` library (previously `requests`).
* **Response Handling**: Returns the API response (typically JSON) back to the agent flow.

5. **Authentication**: You can configure global authentication (like API keys or OAuth - see [Authentication](/adk-docs/tools/authentication/) for details) when initializing `OpenAPIToolset`. This authentication configuration is automatically applied to all generated `RestApiTool` instances.
Expand Down Expand Up @@ -81,4 +81,4 @@ This example demonstrates generating tools from a simple Pet Store OpenAPI spec

```python title="openapi_example.py"
--8<-- "examples/python/snippets/tools/openapi_tool.py"
```
```
Loading