You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `oai_responses_tool_from_model` function accepts a tool name and description, as well as a list of argument name/description pairs and returns json that is in the format expected for tool definitions in the OpenAI responses API.
257
257
258
258
> [!WARNING]
259
-
> The API used to generate the tools json is an interal function from the [Open AI API](https://github.com/openai/openai-python) and may therefore change in the future. There currently is no public API to generate the tool definition from a Pydantic model or a function signature.
259
+
> The API used to generate the tools json is an internal function from the [Open AI API](https://github.com/openai/openai-python) and may therefore change in the future. There currently is no public API to generate the tool definition from a Pydantic model or a function signature.
260
260
261
-
*File:helpers/tool_helpers.py*
261
+
*File:helpers/tool_helpers.py*
262
262
```python
263
263
from openai.lib._pydantic import to_strict_json_schema # private API; may change
264
264
# there currently is no public API to generate the tool definition from a Pydantic model
@@ -306,7 +306,7 @@ updating the `get_tools` and `get_handler` methods).
306
306
the LLM.
307
307
- The `get_handler` method captures the mapping from tool name to tool function
308
308
309
-
*File: tools/__init__py*
309
+
*File: tools/__init__.py*
310
310
```python
311
311
# Uncomment and comment out the tools you want to use
0 commit comments