anhtld commited on
Commit
05090a3
·
verified ·
1 Parent(s): 2420cb7

auto-sync 2026-07-02T13:37:00Z workspace (part 11)

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +37 -0
  2. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/INSTALLER +1 -0
  3. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/METADATA +1036 -0
  4. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/RECORD +0 -0
  5. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/WHEEL +4 -0
  6. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/licenses/LICENSE +201 -0
  7. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_create_event_param.py +48 -0
  8. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_created_event.py +25 -0
  9. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_done_event.py +32 -0
  10. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_function_call_arguments_delta_event.py +32 -0
  11. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_function_call_arguments_done_event.py +38 -0
  12. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_arguments_delta.py +33 -0
  13. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_arguments_done.py +29 -0
  14. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_completed.py +23 -0
  15. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_failed.py +23 -0
  16. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_in_progress.py +23 -0
  17. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_output_item_added_event.py +27 -0
  18. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_output_item_done_event.py +31 -0
  19. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_text_delta_event.py +32 -0
  20. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_text_done_event.py +36 -0
  21. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/session_created_event.py +30 -0
  22. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/session_update_event.py +43 -0
  23. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/session_update_event_param.py +44 -0
  24. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/session_updated_event.py +28 -0
  25. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/__init__.py +330 -0
  26. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/apply_patch_tool.py +14 -0
  27. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/apply_patch_tool_param.py +14 -0
  28. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/compacted_response.py +33 -0
  29. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_action.py +196 -0
  30. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_action_list.py +10 -0
  31. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_action_list_param.py +198 -0
  32. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_action_param.py +195 -0
  33. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_tool.py +17 -0
  34. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_tool_param.py +17 -0
  35. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_use_preview_tool.py +26 -0
  36. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_use_preview_tool_param.py +26 -0
  37. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_auto.py +36 -0
  38. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_auto_param.py +35 -0
  39. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_network_policy_allowlist.py +20 -0
  40. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_network_policy_allowlist_param.py +22 -0
  41. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_network_policy_disabled.py +12 -0
  42. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_network_policy_disabled_param.py +12 -0
  43. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_reference.py +15 -0
  44. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_reference_param.py +15 -0
  45. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/custom_tool.py +31 -0
  46. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/custom_tool_param.py +31 -0
  47. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/easy_input_message.py +42 -0
  48. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/easy_input_message_param.py +43 -0
  49. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/file_search_tool.py +69 -0
  50. workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/file_search_tool_param.py +71 -0
.gitattributes CHANGED
@@ -184,3 +184,40 @@ workspace/outputs/audit_venv/lib/python3.11/site-packages/numpy/random/_pcg64.cp
184
  workspace/outputs/audit_venv/lib/python3.11/site-packages/numpy/random/_philox.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
185
  workspace/outputs/audit_venv/lib/python3.11/site-packages/numpy/random/bit_generator.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
186
  workspace/outputs/audit_venv/lib/python3.11/site-packages/numpy/random/mtrand.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
184
  workspace/outputs/audit_venv/lib/python3.11/site-packages/numpy/random/_philox.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
185
  workspace/outputs/audit_venv/lib/python3.11/site-packages/numpy/random/bit_generator.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
186
  workspace/outputs/audit_venv/lib/python3.11/site-packages/numpy/random/mtrand.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
187
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/_cyutility.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
188
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/algos.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
189
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/arrays.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
190
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/groupby.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
191
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/hashtable.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
192
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/index.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
193
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/internals.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
194
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/interval.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
195
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/join.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
196
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/lib.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
197
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/missing.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
198
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/ops.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
199
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/parsers.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
200
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/properties.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
201
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/reshape.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
202
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/sas.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
203
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/sparse.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
204
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/testing.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
205
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslib.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
206
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/ccalendar.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
207
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/conversion.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
208
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/dtypes.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
209
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/fields.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
210
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/nattype.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
211
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/np_datetime.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
212
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/offsets.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
213
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/parsing.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
214
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/period.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
215
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/strptime.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
216
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/timedeltas.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
217
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/timestamps.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
218
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/timezones.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
219
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/tzconversion.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
220
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/tslibs/vectorized.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
221
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/window/aggregations.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
222
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/window/indexers.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
223
+ workspace/outputs/audit_venv/lib/python3.11/site-packages/pandas/_libs/writers.cpython-311-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/INSTALLER ADDED
@@ -0,0 +1 @@
 
 
1
+ pip
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/METADATA ADDED
@@ -0,0 +1,1036 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Metadata-Version: 2.3
2
+ Name: openai
3
+ Version: 2.43.0
4
+ Summary: The official Python library for the openai API
5
+ Project-URL: Homepage, https://github.com/openai/openai-python
6
+ Project-URL: Repository, https://github.com/openai/openai-python
7
+ Author-email: OpenAI <support@openai.com>
8
+ License: Apache-2.0
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Operating System :: MacOS
12
+ Classifier: Operating System :: Microsoft :: Windows
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.9
25
+ Requires-Dist: anyio<5,>=3.5.0
26
+ Requires-Dist: distro<2,>=1.7.0
27
+ Requires-Dist: httpx<1,>=0.23.0
28
+ Requires-Dist: jiter<1,>=0.10.0
29
+ Requires-Dist: pydantic<3,>=1.9.0
30
+ Requires-Dist: sniffio
31
+ Requires-Dist: tqdm>4
32
+ Requires-Dist: typing-extensions<5,>=4.11
33
+ Requires-Dist: typing-extensions<5,>=4.14
34
+ Provides-Extra: aiohttp
35
+ Requires-Dist: aiohttp; extra == 'aiohttp'
36
+ Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
37
+ Provides-Extra: datalib
38
+ Requires-Dist: numpy>=1; extra == 'datalib'
39
+ Requires-Dist: pandas-stubs>=1.1.0.11; extra == 'datalib'
40
+ Requires-Dist: pandas>=1.2.3; extra == 'datalib'
41
+ Provides-Extra: realtime
42
+ Requires-Dist: websockets<16,>=13; extra == 'realtime'
43
+ Provides-Extra: voice-helpers
44
+ Requires-Dist: numpy>=2.0.2; extra == 'voice-helpers'
45
+ Requires-Dist: sounddevice>=0.5.1; extra == 'voice-helpers'
46
+ Description-Content-Type: text/markdown
47
+
48
+ # OpenAI Python API library
49
+
50
+ <!-- prettier-ignore -->
51
+ [![PyPI version](https://img.shields.io/pypi/v/openai.svg?label=pypi%20(stable))](https://pypi.org/project/openai/)
52
+
53
+ The OpenAI Python library provides convenient access to the OpenAI REST API from any Python 3.9+
54
+ application. The library includes type definitions for all request params and response fields,
55
+ and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
56
+
57
+ It is generated from our [OpenAPI specification](https://github.com/openai/openai-openapi) with [Stainless](https://stainlessapi.com/).
58
+
59
+ ## Documentation
60
+
61
+ The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs/api-reference). The full API of this library can be found in [api.md](https://github.com/openai/openai-python/tree/main/api.md).
62
+
63
+ ## Installation
64
+
65
+ ```sh
66
+ # install from PyPI
67
+ pip install openai
68
+ ```
69
+
70
+ ## Usage
71
+
72
+ The full API of this library can be found in [api.md](https://github.com/openai/openai-python/tree/main/api.md).
73
+
74
+ The primary API for interacting with OpenAI models is the [Responses API](https://platform.openai.com/docs/api-reference/responses). You can generate text from the model with the code below.
75
+
76
+ ```python
77
+ import os
78
+ from openai import OpenAI
79
+
80
+ client = OpenAI(
81
+ # This is the default and can be omitted
82
+ api_key=os.environ.get("OPENAI_API_KEY"),
83
+ )
84
+
85
+ response = client.responses.create(
86
+ model="gpt-5.5",
87
+ instructions="You are a coding assistant that talks like a pirate.",
88
+ input="How do I check if a Python object is an instance of a class?",
89
+ )
90
+
91
+ print(response.output_text)
92
+ ```
93
+
94
+ The previous standard (supported indefinitely) for generating text is the [Chat Completions API](https://platform.openai.com/docs/api-reference/chat). You can use that API to generate text from the model with the code below.
95
+
96
+ ```python
97
+ from openai import OpenAI
98
+
99
+ client = OpenAI()
100
+
101
+ completion = client.chat.completions.create(
102
+ model="gpt-5.5",
103
+ messages=[
104
+ {"role": "developer", "content": "Talk like a pirate."},
105
+ {
106
+ "role": "user",
107
+ "content": "How do I check if a Python object is an instance of a class?",
108
+ },
109
+ ],
110
+ )
111
+
112
+ print(completion.choices[0].message.content)
113
+ ```
114
+
115
+ While you can provide an `api_key` keyword argument,
116
+ we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
117
+ to add `OPENAI_API_KEY="My API Key"` to your `.env` file
118
+ so that your API key is not stored in source control.
119
+ [Get an API key here](https://platform.openai.com/settings/organization/api-keys).
120
+
121
+ ### Workload Identity Authentication
122
+
123
+ For secure, automated environments like cloud-managed Kubernetes, Azure, and Google Cloud Platform, you can use workload identity authentication with short-lived tokens from cloud identity providers instead of long-lived API keys.
124
+
125
+ #### Kubernetes (service account tokens)
126
+
127
+ ```python
128
+ from openai import OpenAI
129
+ from openai.auth import k8s_service_account_token_provider
130
+
131
+ client = OpenAI(
132
+ workload_identity={
133
+ "identity_provider_id": "idp-123",
134
+ "service_account_id": "sa-456",
135
+ "provider": k8s_service_account_token_provider(
136
+ "/var/run/secrets/kubernetes.io/serviceaccount/token"
137
+ ),
138
+ },
139
+ )
140
+
141
+ response = client.chat.completions.create(
142
+ model="gpt-5.5",
143
+ messages=[{"role": "user", "content": "Hello!"}],
144
+ )
145
+ ```
146
+
147
+ #### Azure (managed identity)
148
+
149
+ ```python
150
+ from openai import OpenAI
151
+ from openai.auth import azure_managed_identity_token_provider
152
+
153
+ client = OpenAI(
154
+ workload_identity={
155
+ "identity_provider_id": "idp-123",
156
+ "service_account_id": "sa-456",
157
+ "provider": azure_managed_identity_token_provider(
158
+ resource="https://management.azure.com/",
159
+ ),
160
+ },
161
+ )
162
+ ```
163
+
164
+ #### Google Cloud Platform (compute engine metadata)
165
+
166
+ ```python
167
+ from openai import OpenAI
168
+ from openai.auth import gcp_id_token_provider
169
+
170
+ client = OpenAI(
171
+ workload_identity={
172
+ "identity_provider_id": "idp-123",
173
+ "service_account_id": "sa-456",
174
+ "provider": gcp_id_token_provider(audience="https://api.openai.com/v1"),
175
+ },
176
+ )
177
+ ```
178
+
179
+ #### Custom subject token provider
180
+
181
+ ```python
182
+ from openai import OpenAI
183
+
184
+
185
+ def get_custom_token() -> str:
186
+ return "your-jwt-token"
187
+
188
+
189
+ client = OpenAI(
190
+ workload_identity={
191
+ "identity_provider_id": "idp-123",
192
+ "service_account_id": "sa-456",
193
+ "provider": {
194
+ "token_type": "jwt",
195
+ "get_token": get_custom_token,
196
+ },
197
+ }
198
+ )
199
+ ```
200
+
201
+ You can also customize the token refresh buffer (default is 1200 seconds (20 minutes) before expiration):
202
+
203
+ ```python
204
+ from openai import OpenAI
205
+ from openai.auth import k8s_service_account_token_provider
206
+
207
+ client = OpenAI(
208
+ workload_identity={
209
+ "identity_provider_id": "idp-123",
210
+ "service_account_id": "sa-456",
211
+ "provider": k8s_service_account_token_provider("/var/token"),
212
+ "refresh_buffer_seconds": 120.0,
213
+ }
214
+ )
215
+ ```
216
+
217
+ ### Vision
218
+
219
+ With an image URL:
220
+
221
+ ```python
222
+ prompt = "What is in this image?"
223
+ img_url = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/d5/2023_06_08_Raccoon1.jpg/1599px-2023_06_08_Raccoon1.jpg"
224
+
225
+ response = client.responses.create(
226
+ model="gpt-5.5",
227
+ input=[
228
+ {
229
+ "role": "user",
230
+ "content": [
231
+ {"type": "input_text", "text": prompt},
232
+ {"type": "input_image", "image_url": f"{img_url}"},
233
+ ],
234
+ }
235
+ ],
236
+ )
237
+ ```
238
+
239
+ With the image as a base64 encoded string:
240
+
241
+ ```python
242
+ import base64
243
+ from openai import OpenAI
244
+
245
+ client = OpenAI()
246
+
247
+ prompt = "What is in this image?"
248
+ with open("path/to/image.png", "rb") as image_file:
249
+ b64_image = base64.b64encode(image_file.read()).decode("utf-8")
250
+
251
+ response = client.responses.create(
252
+ model="gpt-5.5",
253
+ input=[
254
+ {
255
+ "role": "user",
256
+ "content": [
257
+ {"type": "input_text", "text": prompt},
258
+ {"type": "input_image", "image_url": f"data:image/png;base64,{b64_image}"},
259
+ ],
260
+ }
261
+ ],
262
+ )
263
+ ```
264
+
265
+ ## Async usage
266
+
267
+ Simply import `AsyncOpenAI` instead of `OpenAI` and use `await` with each API call:
268
+
269
+ ```python
270
+ import os
271
+ import asyncio
272
+ from openai import AsyncOpenAI
273
+
274
+ client = AsyncOpenAI(
275
+ # This is the default and can be omitted
276
+ api_key=os.environ.get("OPENAI_API_KEY"),
277
+ )
278
+
279
+
280
+ async def main() -> None:
281
+ response = await client.responses.create(
282
+ model="gpt-5.5", input="Explain disestablishmentarianism to a smart five year old."
283
+ )
284
+ print(response.output_text)
285
+
286
+
287
+ asyncio.run(main())
288
+ ```
289
+
290
+ Functionality between the synchronous and asynchronous clients is otherwise identical.
291
+
292
+ ### With aiohttp
293
+
294
+ By default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.
295
+
296
+ You can enable this by installing `aiohttp`:
297
+
298
+ ```sh
299
+ # install from PyPI
300
+ pip install openai[aiohttp]
301
+ ```
302
+
303
+ Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
304
+
305
+ ```python
306
+ import os
307
+ import asyncio
308
+ from openai import DefaultAioHttpClient
309
+ from openai import AsyncOpenAI
310
+
311
+
312
+ async def main() -> None:
313
+ async with AsyncOpenAI(
314
+ api_key=os.environ.get("OPENAI_API_KEY"), # This is the default and can be omitted
315
+ http_client=DefaultAioHttpClient(),
316
+ ) as client:
317
+ chat_completion = await client.chat.completions.create(
318
+ messages=[
319
+ {
320
+ "role": "user",
321
+ "content": "Say this is a test",
322
+ }
323
+ ],
324
+ model="gpt-5.5",
325
+ )
326
+
327
+
328
+ asyncio.run(main())
329
+ ```
330
+
331
+ ## Streaming responses
332
+
333
+ We provide support for streaming responses using Server Side Events (SSE).
334
+
335
+ ```python
336
+ from openai import OpenAI
337
+
338
+ client = OpenAI()
339
+
340
+ stream = client.responses.create(
341
+ model="gpt-5.5",
342
+ input="Write a one-sentence bedtime story about a unicorn.",
343
+ stream=True,
344
+ )
345
+
346
+ for event in stream:
347
+ print(event)
348
+ ```
349
+
350
+ The async client uses the exact same interface.
351
+
352
+ ```python
353
+ import asyncio
354
+ from openai import AsyncOpenAI
355
+
356
+ client = AsyncOpenAI()
357
+
358
+
359
+ async def main():
360
+ stream = await client.responses.create(
361
+ model="gpt-5.5",
362
+ input="Write a one-sentence bedtime story about a unicorn.",
363
+ stream=True,
364
+ )
365
+
366
+ async for event in stream:
367
+ print(event)
368
+
369
+
370
+ asyncio.run(main())
371
+ ```
372
+
373
+ ## Realtime API
374
+
375
+ The Realtime API enables you to build low-latency, multi-modal conversational experiences. It currently supports text and audio as both input and output, as well as [function calling](https://platform.openai.com/docs/guides/function-calling) through a WebSocket connection.
376
+
377
+ Under the hood the SDK uses the [`websockets`](https://websockets.readthedocs.io/en/stable/) library to manage connections.
378
+
379
+ The Realtime API works through a combination of client-sent events and server-sent events. Clients can send events to do things like update session configuration or send text and audio inputs. Server events confirm when audio responses have completed, or when a text response from the model has been received. A full event reference can be found [here](https://platform.openai.com/docs/api-reference/realtime-client-events) and a guide can be found [here](https://platform.openai.com/docs/guides/realtime).
380
+
381
+ Basic text based example:
382
+
383
+ ```py
384
+ import asyncio
385
+ from openai import AsyncOpenAI
386
+
387
+ async def main():
388
+ client = AsyncOpenAI()
389
+
390
+ async with client.realtime.connect(model="gpt-realtime-2") as connection:
391
+ await connection.session.update(
392
+ session={"type": "realtime", "output_modalities": ["text"]}
393
+ )
394
+
395
+ await connection.conversation.item.create(
396
+ item={
397
+ "type": "message",
398
+ "role": "user",
399
+ "content": [{"type": "input_text", "text": "Say hello!"}],
400
+ }
401
+ )
402
+ await connection.response.create()
403
+
404
+ async for event in connection:
405
+ if event.type == "response.output_text.delta":
406
+ print(event.delta, flush=True, end="")
407
+
408
+ elif event.type == "response.output_text.done":
409
+ print()
410
+
411
+ elif event.type == "response.done":
412
+ break
413
+
414
+ asyncio.run(main())
415
+ ```
416
+
417
+ However the real magic of the Realtime API is handling audio inputs / outputs, see this example [TUI script](https://github.com/openai/openai-python/blob/main/examples/realtime/push_to_talk_app.py) for a fully fledged example.
418
+
419
+ ### Realtime error handling
420
+
421
+ Whenever an error occurs, the Realtime API will send an [`error` event](https://platform.openai.com/docs/guides/realtime-model-capabilities#error-handling) and the connection will stay open and remain usable. This means you need to handle it yourself, as _no errors are raised directly_ by the SDK when an `error` event comes in.
422
+
423
+ ```py
424
+ client = AsyncOpenAI()
425
+
426
+ async with client.realtime.connect(model="gpt-realtime-2") as connection:
427
+ ...
428
+ async for event in connection:
429
+ if event.type == 'error':
430
+ print(event.error.type)
431
+ print(event.error.code)
432
+ print(event.error.event_id)
433
+ print(event.error.message)
434
+ ```
435
+
436
+ ## Using types
437
+
438
+ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:
439
+
440
+ - Serializing back into JSON, `model.to_json()`
441
+ - Converting to a dictionary, `model.to_dict()`
442
+
443
+ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
444
+
445
+ ## Pagination
446
+
447
+ List methods in the OpenAI API are paginated.
448
+
449
+ This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:
450
+
451
+ ```python
452
+ from openai import OpenAI
453
+
454
+ client = OpenAI()
455
+
456
+ all_jobs = []
457
+ # Automatically fetches more pages as needed.
458
+ for job in client.fine_tuning.jobs.list(
459
+ limit=20,
460
+ ):
461
+ # Do something with job here
462
+ all_jobs.append(job)
463
+ print(all_jobs)
464
+ ```
465
+
466
+ Or, asynchronously:
467
+
468
+ ```python
469
+ import asyncio
470
+ from openai import AsyncOpenAI
471
+
472
+ client = AsyncOpenAI()
473
+
474
+
475
+ async def main() -> None:
476
+ all_jobs = []
477
+ # Iterate through items across all pages, issuing requests as needed.
478
+ async for job in client.fine_tuning.jobs.list(
479
+ limit=20,
480
+ ):
481
+ all_jobs.append(job)
482
+ print(all_jobs)
483
+
484
+
485
+ asyncio.run(main())
486
+ ```
487
+
488
+ Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:
489
+
490
+ ```python
491
+ first_page = await client.fine_tuning.jobs.list(
492
+ limit=20,
493
+ )
494
+ if first_page.has_next_page():
495
+ print(f"will fetch next page using these details: {first_page.next_page_info()}")
496
+ next_page = await first_page.get_next_page()
497
+ print(f"number of items we just fetched: {len(next_page.data)}")
498
+
499
+ # Remove `await` for non-async usage.
500
+ ```
501
+
502
+ Or just work directly with the returned data:
503
+
504
+ ```python
505
+ first_page = await client.fine_tuning.jobs.list(
506
+ limit=20,
507
+ )
508
+
509
+ print(f"next page cursor: {first_page.after}") # => "next page cursor: ..."
510
+ for job in first_page.data:
511
+ print(job.id)
512
+
513
+ # Remove `await` for non-async usage.
514
+ ```
515
+
516
+ ## Nested params
517
+
518
+ Nested parameters are dictionaries, typed using `TypedDict`, for example:
519
+
520
+ ```python
521
+ from openai import OpenAI
522
+
523
+ client = OpenAI()
524
+
525
+ response = client.responses.create(
526
+ input=[
527
+ {
528
+ "role": "user",
529
+ "content": "How much ?",
530
+ }
531
+ ],
532
+ model="gpt-5.5",
533
+ text={"format": {"type": "json_object"}},
534
+ )
535
+ ```
536
+
537
+ ## File uploads
538
+
539
+ Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
540
+
541
+ ```python
542
+ from pathlib import Path
543
+ from openai import OpenAI
544
+
545
+ client = OpenAI()
546
+
547
+ client.files.create(
548
+ file=Path("input.jsonl"),
549
+ purpose="fine-tune",
550
+ )
551
+ ```
552
+
553
+ The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.
554
+
555
+ ## Webhook Verification
556
+
557
+ Verifying webhook signatures is _optional but encouraged_.
558
+
559
+ For more information about webhooks, see [the API docs](https://platform.openai.com/docs/guides/webhooks).
560
+
561
+ ### Parsing webhook payloads
562
+
563
+ For most use cases, you will likely want to verify the webhook and parse the payload at the same time. To achieve this, we provide the method `client.webhooks.unwrap()`, which parses a webhook request and verifies that it was sent by OpenAI. This method will raise an error if the signature is invalid.
564
+
565
+ Note that the `body` parameter must be the raw JSON string sent from the server (do not parse it first). The `.unwrap()` method will parse this JSON for you into an event object after verifying the webhook was sent from OpenAI.
566
+
567
+ ```python
568
+ from openai import OpenAI
569
+ from flask import Flask, request
570
+
571
+ app = Flask(__name__)
572
+ client = OpenAI() # OPENAI_WEBHOOK_SECRET environment variable is used by default
573
+
574
+
575
+ @app.route("/webhook", methods=["POST"])
576
+ def webhook():
577
+ request_body = request.get_data(as_text=True)
578
+
579
+ try:
580
+ event = client.webhooks.unwrap(request_body, request.headers)
581
+
582
+ if event.type == "response.completed":
583
+ print("Response completed:", event.data)
584
+ elif event.type == "response.failed":
585
+ print("Response failed:", event.data)
586
+ else:
587
+ print("Unhandled event type:", event.type)
588
+
589
+ return "ok"
590
+ except Exception as e:
591
+ print("Invalid signature:", e)
592
+ return "Invalid signature", 400
593
+
594
+
595
+ if __name__ == "__main__":
596
+ app.run(port=8000)
597
+ ```
598
+
599
+ ### Verifying webhook payloads directly
600
+
601
+ In some cases, you may want to verify the webhook separately from parsing the payload. If you prefer to handle these steps separately, we provide the method `client.webhooks.verify_signature()` to _only verify_ the signature of a webhook request. Like `.unwrap()`, this method will raise an error if the signature is invalid.
602
+
603
+ Note that the `body` parameter must be the raw JSON string sent from the server (do not parse it first). You will then need to parse the body after verifying the signature.
604
+
605
+ ```python
606
+ import json
607
+ from openai import OpenAI
608
+ from flask import Flask, request
609
+
610
+ app = Flask(__name__)
611
+ client = OpenAI() # OPENAI_WEBHOOK_SECRET environment variable is used by default
612
+
613
+
614
+ @app.route("/webhook", methods=["POST"])
615
+ def webhook():
616
+ request_body = request.get_data(as_text=True)
617
+
618
+ try:
619
+ client.webhooks.verify_signature(request_body, request.headers)
620
+
621
+ # Parse the body after verification
622
+ event = json.loads(request_body)
623
+ print("Verified event:", event)
624
+
625
+ return "ok"
626
+ except Exception as e:
627
+ print("Invalid signature:", e)
628
+ return "Invalid signature", 400
629
+
630
+
631
+ if __name__ == "__main__":
632
+ app.run(port=8000)
633
+ ```
634
+
635
+ ## Handling errors
636
+
637
+ When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `openai.APIConnectionError` is raised.
638
+
639
+ When the API returns a non-success status code (that is, 4xx or 5xx
640
+ response), a subclass of `openai.APIStatusError` is raised, containing `status_code` and `response` properties.
641
+
642
+ All errors inherit from `openai.APIError`.
643
+
644
+ ```python
645
+ import openai
646
+ from openai import OpenAI
647
+
648
+ client = OpenAI()
649
+
650
+ try:
651
+ client.fine_tuning.jobs.create(
652
+ model="gpt-4o",
653
+ training_file="file-abc123",
654
+ )
655
+ except openai.APIConnectionError as e:
656
+ print("The server could not be reached")
657
+ print(e.__cause__) # an underlying Exception, likely raised within httpx.
658
+ except openai.RateLimitError as e:
659
+ print("A 429 status code was received; we should back off a bit.")
660
+ except openai.APIStatusError as e:
661
+ print("Another non-200-range status code was received")
662
+ print(e.status_code)
663
+ print(e.response)
664
+ ```
665
+
666
+ Error codes are as follows:
667
+
668
+ | Status Code | Error Type |
669
+ | ----------- | -------------------------- |
670
+ | 400 | `BadRequestError` |
671
+ | 401 | `AuthenticationError` |
672
+ | 403 | `PermissionDeniedError` |
673
+ | 404 | `NotFoundError` |
674
+ | 422 | `UnprocessableEntityError` |
675
+ | 429 | `RateLimitError` |
676
+ | >=500 | `InternalServerError` |
677
+ | N/A | `APIConnectionError` |
678
+
679
+ ## Request IDs
680
+
681
+ > For more information on debugging requests, see [these docs](https://platform.openai.com/docs/api-reference/debugging-requests)
682
+
683
+ All object responses in the SDK provide a `_request_id` property which is added from the `x-request-id` response header so that you can quickly log failing requests and report them back to OpenAI.
684
+
685
+ ```python
686
+ response = await client.responses.create(
687
+ model="gpt-5.5",
688
+ input="Say 'this is a test'.",
689
+ )
690
+ print(response._request_id) # req_123
691
+ ```
692
+
693
+ Note that unlike other properties that use an `_` prefix, the `_request_id` property
694
+ _is_ public. Unless documented otherwise, _all_ other `_` prefix properties,
695
+ methods and modules are _private_.
696
+
697
+ > [!IMPORTANT]
698
+ > If you need to access request IDs for failed requests you must catch the `APIStatusError` exception
699
+
700
+ ```python
701
+ import openai
702
+
703
+ try:
704
+ completion = await client.chat.completions.create(
705
+ messages=[{"role": "user", "content": "Say this is a test"}], model="gpt-5.5"
706
+ )
707
+ except openai.APIStatusError as exc:
708
+ print(exc.request_id) # req_123
709
+ raise exc
710
+ ```
711
+
712
+ ## Retries
713
+
714
+ Certain errors are automatically retried 2 times by default, with a short exponential backoff.
715
+ Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,
716
+ 429 Rate Limit, and >=500 Internal errors are all retried by default.
717
+
718
+ You can use the `max_retries` option to configure or disable retry settings:
719
+
720
+ ```python
721
+ from openai import OpenAI
722
+
723
+ # Configure the default for all requests:
724
+ client = OpenAI(
725
+ # default is 2
726
+ max_retries=0,
727
+ )
728
+
729
+ # Or, configure per-request:
730
+ client.with_options(max_retries=5).chat.completions.create(
731
+ messages=[
732
+ {
733
+ "role": "user",
734
+ "content": "How can I get the name of the current day in JavaScript?",
735
+ }
736
+ ],
737
+ model="gpt-5.5",
738
+ )
739
+ ```
740
+
741
+ ## Timeouts
742
+
743
+ By default requests time out after 10 minutes. You can configure this with a `timeout` option,
744
+ which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:
745
+
746
+ ```python
747
+ from openai import OpenAI
748
+
749
+ # Configure the default for all requests:
750
+ client = OpenAI(
751
+ # 20 seconds (default is 10 minutes)
752
+ timeout=20.0,
753
+ )
754
+
755
+ # More granular control:
756
+ client = OpenAI(
757
+ timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
758
+ )
759
+
760
+ # Override per-request:
761
+ client.with_options(timeout=5.0).chat.completions.create(
762
+ messages=[
763
+ {
764
+ "role": "user",
765
+ "content": "How can I list all files in a directory using Python?",
766
+ }
767
+ ],
768
+ model="gpt-5.5",
769
+ )
770
+ ```
771
+
772
+ On timeout, an `APITimeoutError` is thrown.
773
+
774
+ Note that requests that time out are [retried twice by default](https://github.com/openai/openai-python/tree/main/#retries).
775
+
776
+ ## Advanced
777
+
778
+ ### Logging
779
+
780
+ We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.
781
+
782
+ You can enable logging by setting the environment variable `OPENAI_LOG` to `info`.
783
+
784
+ ```shell
785
+ $ export OPENAI_LOG=info
786
+ ```
787
+
788
+ Or to `debug` for more verbose logging.
789
+
790
+ ### How to tell whether `None` means `null` or missing
791
+
792
+ In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:
793
+
794
+ ```py
795
+ if response.my_field is None:
796
+ if 'my_field' not in response.model_fields_set:
797
+ print('Got json like {}, without a "my_field" key present at all.')
798
+ else:
799
+ print('Got json like {"my_field": null}.')
800
+ ```
801
+
802
+ ### Accessing raw response data (e.g. headers)
803
+
804
+ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
805
+
806
+ ```py
807
+ from openai import OpenAI
808
+
809
+ client = OpenAI()
810
+ response = client.chat.completions.with_raw_response.create(
811
+ messages=[{
812
+ "role": "user",
813
+ "content": "Say this is a test",
814
+ }],
815
+ model="gpt-5.5",
816
+ )
817
+ print(response.headers.get('X-My-Header'))
818
+
819
+ completion = response.parse() # get the object that `chat.completions.create()` would have returned
820
+ print(completion)
821
+ ```
822
+
823
+ These methods return a [`LegacyAPIResponse`](https://github.com/openai/openai-python/tree/main/src/openai/_legacy_response.py) object. This is a legacy class as we're changing it slightly in the next major version.
824
+
825
+ For the sync client this will mostly be the same with the exception
826
+ of `content` & `text` will be methods instead of properties. In the
827
+ async client, all methods will be async.
828
+
829
+ A migration script will be provided & the migration in general should
830
+ be smooth.
831
+
832
+ #### `.with_streaming_response`
833
+
834
+ The above interface eagerly reads the full response body when you make the request, which may not always be what you want.
835
+
836
+ To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
837
+
838
+ As such, `.with_streaming_response` methods return a different [`APIResponse`](https://github.com/openai/openai-python/tree/main/src/openai/_response.py) object, and the async client returns an [`AsyncAPIResponse`](https://github.com/openai/openai-python/tree/main/src/openai/_response.py) object.
839
+
840
+ ```python
841
+ with client.chat.completions.with_streaming_response.create(
842
+ messages=[
843
+ {
844
+ "role": "user",
845
+ "content": "Say this is a test",
846
+ }
847
+ ],
848
+ model="gpt-5.5",
849
+ ) as response:
850
+ print(response.headers.get("X-My-Header"))
851
+
852
+ for line in response.iter_lines():
853
+ print(line)
854
+ ```
855
+
856
+ The context manager is required so that the response will reliably be closed.
857
+
858
+ ### Making custom/undocumented requests
859
+
860
+ This library is typed for convenient access to the documented API.
861
+
862
+ If you need to access undocumented endpoints, params, or response properties, the library can still be used.
863
+
864
+ #### Undocumented endpoints
865
+
866
+ To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other
867
+ http verbs. Options on the client will be respected (such as retries) when making this request.
868
+
869
+ ```py
870
+ import httpx
871
+
872
+ response = client.post(
873
+ "/foo",
874
+ cast_to=httpx.Response,
875
+ body={"my_param": True},
876
+ )
877
+
878
+ print(response.headers.get("x-foo"))
879
+ ```
880
+
881
+ #### Undocumented request params
882
+
883
+ If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request
884
+ options.
885
+
886
+ #### Undocumented response properties
887
+
888
+ To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You
889
+ can also get all the extra fields on the Pydantic model as a dict with
890
+ [`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).
891
+
892
+ ### Configuring the HTTP client
893
+
894
+ You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:
895
+
896
+ - Support for [proxies](https://www.python-httpx.org/advanced/proxies/)
897
+ - Custom [transports](https://www.python-httpx.org/advanced/transports/)
898
+ - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality
899
+
900
+ ```python
901
+ import httpx
902
+ from openai import OpenAI, DefaultHttpxClient
903
+
904
+ client = OpenAI(
905
+ # Or use the `OPENAI_BASE_URL` env var
906
+ base_url="http://my.test.server.example.com:8083/v1",
907
+ http_client=DefaultHttpxClient(
908
+ proxy="http://my.test.proxy.example.com",
909
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
910
+ ),
911
+ )
912
+ ```
913
+
914
+ You can also customize the client on a per-request basis by using `with_options()`:
915
+
916
+ ```python
917
+ client.with_options(http_client=DefaultHttpxClient(...))
918
+ ```
919
+
920
+ ### Managing HTTP resources
921
+
922
+ By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.
923
+
924
+ ```py
925
+ from openai import OpenAI
926
+
927
+ with OpenAI() as client:
928
+ # make requests here
929
+ ...
930
+
931
+ # HTTP client is now closed
932
+ ```
933
+
934
+ ## Microsoft Azure OpenAI
935
+
936
+ To use this library with [Azure OpenAI](https://learn.microsoft.com/azure/ai-services/openai/overview), use the `AzureOpenAI`
937
+ class instead of the `OpenAI` class.
938
+
939
+ > [!IMPORTANT]
940
+ > The Azure API shape differs from the core API shape which means that the static types for responses / params
941
+ > won't always be correct.
942
+
943
+ ```py
944
+ from openai import AzureOpenAI
945
+
946
+ # gets the API Key from environment variable AZURE_OPENAI_API_KEY
947
+ client = AzureOpenAI(
948
+ # https://learn.microsoft.com/azure/ai-services/openai/reference#rest-api-versioning
949
+ api_version="2023-07-01-preview",
950
+ # https://learn.microsoft.com/azure/cognitive-services/openai/how-to/create-resource?pivots=web-portal#create-a-resource
951
+ azure_endpoint="https://example-endpoint.openai.azure.com",
952
+ )
953
+
954
+ completion = client.chat.completions.create(
955
+ model="deployment-name", # e.g. gpt-35-instant
956
+ messages=[
957
+ {
958
+ "role": "user",
959
+ "content": "How do I output all files in a directory using Python?",
960
+ },
961
+ ],
962
+ )
963
+ print(completion.to_json())
964
+ ```
965
+
966
+ In addition to the options provided in the base `OpenAI` client, the following options are provided:
967
+
968
+ - `azure_endpoint` (or the `AZURE_OPENAI_ENDPOINT` environment variable)
969
+ - `azure_deployment`
970
+ - `api_version` (or the `OPENAI_API_VERSION` environment variable)
971
+ - `azure_ad_token` (or the `AZURE_OPENAI_AD_TOKEN` environment variable)
972
+ - `azure_ad_token_provider`
973
+
974
+ An example of using the client with Microsoft Entra ID (formerly known as Azure Active Directory) can be found [here](https://github.com/openai/openai-python/blob/main/examples/azure_ad.py).
975
+
976
+ ## Amazon Bedrock
977
+
978
+ To use this library with [Amazon Bedrock's OpenAI-compatible API](https://docs.aws.amazon.com/bedrock/latest/userguide/models-api-compatibility.html), use the `BedrockOpenAI` class instead of the `OpenAI` class.
979
+
980
+ ```py
981
+ from openai import BedrockOpenAI
982
+
983
+ # gets the bearer token from AWS_BEARER_TOKEN_BEDROCK and the region from AWS_REGION/AWS_DEFAULT_REGION
984
+ client = BedrockOpenAI()
985
+
986
+ response = client.responses.create(
987
+ model="openai.gpt-5.4",
988
+ input="Say hello!",
989
+ )
990
+
991
+ print(response.output_text)
992
+ ```
993
+
994
+ `BedrockOpenAI` configures AWS bearer auth and the Bedrock Mantle endpoint, then uses the normal SDK resources. AWS controls which endpoints and features are supported; unsupported calls surface the provider's normal HTTP errors through the SDK.
995
+
996
+ Pass `base_url` or set `AWS_BEDROCK_BASE_URL` to override the derived `https://bedrock-mantle.<region>.api.aws/openai/v1` endpoint. The legacy module client supports `openai.api_type = "amazon-bedrock"` or `OPENAI_API_TYPE=amazon-bedrock`.
997
+
998
+ Set `AWS_BEARER_TOKEN_BEDROCK` to an [Amazon Bedrock API key](https://docs.aws.amazon.com/bedrock/latest/userguide/api-keys.html). To refresh tokens yourself, pass a provider instead of `api_key`:
999
+
1000
+ ```py
1001
+ client = BedrockOpenAI(
1002
+ aws_region="us-west-2",
1003
+ bedrock_token_provider=lambda: refresh_bedrock_token(),
1004
+ )
1005
+ ```
1006
+
1007
+ ## Versioning
1008
+
1009
+ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:
1010
+
1011
+ 1. Changes that only affect static types, without breaking runtime behavior.
1012
+ 2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_
1013
+ 3. Changes that we do not expect to impact the vast majority of users in practice.
1014
+
1015
+ We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
1016
+
1017
+ We are keen for your feedback; please open an [issue](https://www.github.com/openai/openai-python/issues) with questions, bugs, or suggestions.
1018
+
1019
+ ### Determining the installed version
1020
+
1021
+ If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version.
1022
+
1023
+ You can determine the version that is being used at runtime with:
1024
+
1025
+ ```py
1026
+ import openai
1027
+ print(openai.__version__)
1028
+ ```
1029
+
1030
+ ## Requirements
1031
+
1032
+ Python 3.9 or higher.
1033
+
1034
+ ## Contributing
1035
+
1036
+ See [the contributing documentation](https://github.com/openai/openai-python/tree/main/./CONTRIBUTING.md).
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/RECORD ADDED
The diff for this file is too large to render. See raw diff
 
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/WHEEL ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.26.3
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai-2.43.0.dist-info/licenses/LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 OpenAI
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_create_event_param.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ from .realtime_response_create_params_param import RealtimeResponseCreateParamsParam
8
+
9
+ __all__ = ["ResponseCreateEventParam"]
10
+
11
+
12
+ class ResponseCreateEventParam(TypedDict, total=False):
13
+ """
14
+ This event instructs the server to create a Response, which means triggering
15
+ model inference. When in Server VAD mode, the server will create Responses
16
+ automatically.
17
+
18
+ A Response will include at least one Item, and may have two, in which case
19
+ the second will be a function call. These Items will be appended to the
20
+ conversation history by default.
21
+
22
+ The server will respond with a `response.created` event, events for Items
23
+ and content created, and finally a `response.done` event to indicate the
24
+ Response is complete.
25
+
26
+ The `response.create` event includes inference configuration like
27
+ `instructions` and `tools`. If these are set, they will override the Session's
28
+ configuration for this Response only.
29
+
30
+ Responses can be created out-of-band of the default Conversation, meaning that they can
31
+ have arbitrary input, and it's possible to disable writing the output to the Conversation.
32
+ Only one Response can write to the default Conversation at a time, but otherwise multiple
33
+ Responses can be created in parallel. The `metadata` field is a good way to disambiguate
34
+ multiple simultaneous Responses.
35
+
36
+ Clients can set `conversation` to `none` to create a Response that does not write to the default
37
+ Conversation. Arbitrary input can be provided with the `input` field, which is an array accepting
38
+ raw Items and references to existing Items.
39
+ """
40
+
41
+ type: Required[Literal["response.create"]]
42
+ """The event type, must be `response.create`."""
43
+
44
+ event_id: str
45
+ """Optional client-generated ID used to identify this event."""
46
+
47
+ response: RealtimeResponseCreateParamsParam
48
+ """Create a new Realtime response with these parameters"""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_created_event.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+ from .realtime_response import RealtimeResponse
7
+
8
+ __all__ = ["ResponseCreatedEvent"]
9
+
10
+
11
+ class ResponseCreatedEvent(BaseModel):
12
+ """Returned when a new Response is created.
13
+
14
+ The first event of response creation,
15
+ where the response is in an initial state of `in_progress`.
16
+ """
17
+
18
+ event_id: str
19
+ """The unique ID of the server event."""
20
+
21
+ response: RealtimeResponse
22
+ """The response resource."""
23
+
24
+ type: Literal["response.created"]
25
+ """The event type, must be `response.created`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_done_event.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+ from .realtime_response import RealtimeResponse
7
+
8
+ __all__ = ["ResponseDoneEvent"]
9
+
10
+
11
+ class ResponseDoneEvent(BaseModel):
12
+ """Returned when a Response is done streaming.
13
+
14
+ Always emitted, no matter the
15
+ final state. The Response object included in the `response.done` event will
16
+ include all output Items in the Response but will omit the raw audio data.
17
+
18
+ Clients should check the `status` field of the Response to determine if it was successful
19
+ (`completed`) or if there was another outcome: `cancelled`, `failed`, or `incomplete`.
20
+
21
+ A response will contain all output items that were generated during the response, excluding
22
+ any audio content.
23
+ """
24
+
25
+ event_id: str
26
+ """The unique ID of the server event."""
27
+
28
+ response: RealtimeResponse
29
+ """The response resource."""
30
+
31
+ type: Literal["response.done"]
32
+ """The event type, must be `response.done`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_function_call_arguments_delta_event.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ResponseFunctionCallArgumentsDeltaEvent"]
8
+
9
+
10
+ class ResponseFunctionCallArgumentsDeltaEvent(BaseModel):
11
+ """Returned when the model-generated function call arguments are updated."""
12
+
13
+ call_id: str
14
+ """The ID of the function call."""
15
+
16
+ delta: str
17
+ """The arguments delta as a JSON string."""
18
+
19
+ event_id: str
20
+ """The unique ID of the server event."""
21
+
22
+ item_id: str
23
+ """The ID of the function call item."""
24
+
25
+ output_index: int
26
+ """The index of the output item in the response."""
27
+
28
+ response_id: str
29
+ """The ID of the response."""
30
+
31
+ type: Literal["response.function_call_arguments.delta"]
32
+ """The event type, must be `response.function_call_arguments.delta`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_function_call_arguments_done_event.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ResponseFunctionCallArgumentsDoneEvent"]
8
+
9
+
10
+ class ResponseFunctionCallArgumentsDoneEvent(BaseModel):
11
+ """
12
+ Returned when the model-generated function call arguments are done streaming.
13
+ Also emitted when a Response is interrupted, incomplete, or cancelled.
14
+ """
15
+
16
+ arguments: str
17
+ """The final arguments as a JSON string."""
18
+
19
+ call_id: str
20
+ """The ID of the function call."""
21
+
22
+ event_id: str
23
+ """The unique ID of the server event."""
24
+
25
+ item_id: str
26
+ """The ID of the function call item."""
27
+
28
+ name: str
29
+ """The name of the function that was called."""
30
+
31
+ output_index: int
32
+ """The index of the output item in the response."""
33
+
34
+ response_id: str
35
+ """The ID of the response."""
36
+
37
+ type: Literal["response.function_call_arguments.done"]
38
+ """The event type, must be `response.function_call_arguments.done`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_arguments_delta.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from ..._models import BaseModel
7
+
8
+ __all__ = ["ResponseMcpCallArgumentsDelta"]
9
+
10
+
11
+ class ResponseMcpCallArgumentsDelta(BaseModel):
12
+ """Returned when MCP tool call arguments are updated during response generation."""
13
+
14
+ delta: str
15
+ """The JSON-encoded arguments delta."""
16
+
17
+ event_id: str
18
+ """The unique ID of the server event."""
19
+
20
+ item_id: str
21
+ """The ID of the MCP tool call item."""
22
+
23
+ output_index: int
24
+ """The index of the output item in the response."""
25
+
26
+ response_id: str
27
+ """The ID of the response."""
28
+
29
+ type: Literal["response.mcp_call_arguments.delta"]
30
+ """The event type, must be `response.mcp_call_arguments.delta`."""
31
+
32
+ obfuscation: Optional[str] = None
33
+ """If present, indicates the delta text was obfuscated."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_arguments_done.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ResponseMcpCallArgumentsDone"]
8
+
9
+
10
+ class ResponseMcpCallArgumentsDone(BaseModel):
11
+ """Returned when MCP tool call arguments are finalized during response generation."""
12
+
13
+ arguments: str
14
+ """The final JSON-encoded arguments string."""
15
+
16
+ event_id: str
17
+ """The unique ID of the server event."""
18
+
19
+ item_id: str
20
+ """The ID of the MCP tool call item."""
21
+
22
+ output_index: int
23
+ """The index of the output item in the response."""
24
+
25
+ response_id: str
26
+ """The ID of the response."""
27
+
28
+ type: Literal["response.mcp_call_arguments.done"]
29
+ """The event type, must be `response.mcp_call_arguments.done`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_completed.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ResponseMcpCallCompleted"]
8
+
9
+
10
+ class ResponseMcpCallCompleted(BaseModel):
11
+ """Returned when an MCP tool call has completed successfully."""
12
+
13
+ event_id: str
14
+ """The unique ID of the server event."""
15
+
16
+ item_id: str
17
+ """The ID of the MCP tool call item."""
18
+
19
+ output_index: int
20
+ """The index of the output item in the response."""
21
+
22
+ type: Literal["response.mcp_call.completed"]
23
+ """The event type, must be `response.mcp_call.completed`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_failed.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ResponseMcpCallFailed"]
8
+
9
+
10
+ class ResponseMcpCallFailed(BaseModel):
11
+ """Returned when an MCP tool call has failed."""
12
+
13
+ event_id: str
14
+ """The unique ID of the server event."""
15
+
16
+ item_id: str
17
+ """The ID of the MCP tool call item."""
18
+
19
+ output_index: int
20
+ """The index of the output item in the response."""
21
+
22
+ type: Literal["response.mcp_call.failed"]
23
+ """The event type, must be `response.mcp_call.failed`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_mcp_call_in_progress.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ResponseMcpCallInProgress"]
8
+
9
+
10
+ class ResponseMcpCallInProgress(BaseModel):
11
+ """Returned when an MCP tool call has started and is in progress."""
12
+
13
+ event_id: str
14
+ """The unique ID of the server event."""
15
+
16
+ item_id: str
17
+ """The ID of the MCP tool call item."""
18
+
19
+ output_index: int
20
+ """The index of the output item in the response."""
21
+
22
+ type: Literal["response.mcp_call.in_progress"]
23
+ """The event type, must be `response.mcp_call.in_progress`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_output_item_added_event.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+ from .conversation_item import ConversationItem
7
+
8
+ __all__ = ["ResponseOutputItemAddedEvent"]
9
+
10
+
11
+ class ResponseOutputItemAddedEvent(BaseModel):
12
+ """Returned when a new Item is created during Response generation."""
13
+
14
+ event_id: str
15
+ """The unique ID of the server event."""
16
+
17
+ item: ConversationItem
18
+ """A single item within a Realtime conversation."""
19
+
20
+ output_index: int
21
+ """The index of the output item in the Response."""
22
+
23
+ response_id: str
24
+ """The ID of the Response to which the item belongs."""
25
+
26
+ type: Literal["response.output_item.added"]
27
+ """The event type, must be `response.output_item.added`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_output_item_done_event.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+ from .conversation_item import ConversationItem
7
+
8
+ __all__ = ["ResponseOutputItemDoneEvent"]
9
+
10
+
11
+ class ResponseOutputItemDoneEvent(BaseModel):
12
+ """Returned when an Item is done streaming.
13
+
14
+ Also emitted when a Response is
15
+ interrupted, incomplete, or cancelled.
16
+ """
17
+
18
+ event_id: str
19
+ """The unique ID of the server event."""
20
+
21
+ item: ConversationItem
22
+ """A single item within a Realtime conversation."""
23
+
24
+ output_index: int
25
+ """The index of the output item in the Response."""
26
+
27
+ response_id: str
28
+ """The ID of the Response to which the item belongs."""
29
+
30
+ type: Literal["response.output_item.done"]
31
+ """The event type, must be `response.output_item.done`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_text_delta_event.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ResponseTextDeltaEvent"]
8
+
9
+
10
+ class ResponseTextDeltaEvent(BaseModel):
11
+ """Returned when the text value of an "output_text" content part is updated."""
12
+
13
+ content_index: int
14
+ """The index of the content part in the item's content array."""
15
+
16
+ delta: str
17
+ """The text delta."""
18
+
19
+ event_id: str
20
+ """The unique ID of the server event."""
21
+
22
+ item_id: str
23
+ """The ID of the item."""
24
+
25
+ output_index: int
26
+ """The index of the output item in the response."""
27
+
28
+ response_id: str
29
+ """The ID of the response."""
30
+
31
+ type: Literal["response.output_text.delta"]
32
+ """The event type, must be `response.output_text.delta`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/response_text_done_event.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ResponseTextDoneEvent"]
8
+
9
+
10
+ class ResponseTextDoneEvent(BaseModel):
11
+ """Returned when the text value of an "output_text" content part is done streaming.
12
+
13
+ Also
14
+ emitted when a Response is interrupted, incomplete, or cancelled.
15
+ """
16
+
17
+ content_index: int
18
+ """The index of the content part in the item's content array."""
19
+
20
+ event_id: str
21
+ """The unique ID of the server event."""
22
+
23
+ item_id: str
24
+ """The ID of the item."""
25
+
26
+ output_index: int
27
+ """The index of the output item in the response."""
28
+
29
+ response_id: str
30
+ """The ID of the response."""
31
+
32
+ text: str
33
+ """The final text content."""
34
+
35
+ type: Literal["response.output_text.done"]
36
+ """The event type, must be `response.output_text.done`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/session_created_event.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Union
4
+ from typing_extensions import Literal, TypeAlias
5
+
6
+ from ..._models import BaseModel
7
+ from .realtime_session_create_request import RealtimeSessionCreateRequest
8
+ from .realtime_transcription_session_create_request import RealtimeTranscriptionSessionCreateRequest
9
+
10
+ __all__ = ["SessionCreatedEvent", "Session"]
11
+
12
+ Session: TypeAlias = Union[RealtimeSessionCreateRequest, RealtimeTranscriptionSessionCreateRequest]
13
+
14
+
15
+ class SessionCreatedEvent(BaseModel):
16
+ """Returned when a Session is created.
17
+
18
+ Emitted automatically when a new
19
+ connection is established as the first server event. This event will contain
20
+ the default Session configuration.
21
+ """
22
+
23
+ event_id: str
24
+ """The unique ID of the server event."""
25
+
26
+ session: Session
27
+ """The session configuration."""
28
+
29
+ type: Literal["session.created"]
30
+ """The event type, must be `session.created`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/session_update_event.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Union, Optional
4
+ from typing_extensions import Literal, TypeAlias
5
+
6
+ from ..._models import BaseModel
7
+ from .realtime_session_create_request import RealtimeSessionCreateRequest
8
+ from .realtime_transcription_session_create_request import RealtimeTranscriptionSessionCreateRequest
9
+
10
+ __all__ = ["SessionUpdateEvent", "Session"]
11
+
12
+ Session: TypeAlias = Union[RealtimeSessionCreateRequest, RealtimeTranscriptionSessionCreateRequest]
13
+
14
+
15
+ class SessionUpdateEvent(BaseModel):
16
+ """
17
+ Send this event to update the session’s configuration.
18
+ The client may send this event at any time to update any field
19
+ except for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet.
20
+
21
+ When the server receives a `session.update`, it will respond
22
+ with a `session.updated` event showing the full, effective configuration.
23
+ Only the fields that are present in the `session.update` are updated. To clear a field like
24
+ `instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.
25
+ To clear a field like `turn_detection`, pass `null`.
26
+ """
27
+
28
+ session: Session
29
+ """Update the Realtime session.
30
+
31
+ Choose either a realtime session or a transcription session.
32
+ """
33
+
34
+ type: Literal["session.update"]
35
+ """The event type, must be `session.update`."""
36
+
37
+ event_id: Optional[str] = None
38
+ """Optional client-generated ID used to identify this event.
39
+
40
+ This is an arbitrary string that a client may assign. It will be passed back if
41
+ there is an error with the event, but the corresponding `session.updated` event
42
+ will not include it.
43
+ """
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/session_update_event_param.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union
6
+ from typing_extensions import Literal, Required, TypeAlias, TypedDict
7
+
8
+ from .realtime_session_create_request_param import RealtimeSessionCreateRequestParam
9
+ from .realtime_transcription_session_create_request_param import RealtimeTranscriptionSessionCreateRequestParam
10
+
11
+ __all__ = ["SessionUpdateEventParam", "Session"]
12
+
13
+ Session: TypeAlias = Union[RealtimeSessionCreateRequestParam, RealtimeTranscriptionSessionCreateRequestParam]
14
+
15
+
16
+ class SessionUpdateEventParam(TypedDict, total=False):
17
+ """
18
+ Send this event to update the session’s configuration.
19
+ The client may send this event at any time to update any field
20
+ except for `voice` and `model`. `voice` can be updated only if there have been no other audio outputs yet.
21
+
22
+ When the server receives a `session.update`, it will respond
23
+ with a `session.updated` event showing the full, effective configuration.
24
+ Only the fields that are present in the `session.update` are updated. To clear a field like
25
+ `instructions`, pass an empty string. To clear a field like `tools`, pass an empty array.
26
+ To clear a field like `turn_detection`, pass `null`.
27
+ """
28
+
29
+ session: Required[Session]
30
+ """Update the Realtime session.
31
+
32
+ Choose either a realtime session or a transcription session.
33
+ """
34
+
35
+ type: Required[Literal["session.update"]]
36
+ """The event type, must be `session.update`."""
37
+
38
+ event_id: str
39
+ """Optional client-generated ID used to identify this event.
40
+
41
+ This is an arbitrary string that a client may assign. It will be passed back if
42
+ there is an error with the event, but the corresponding `session.updated` event
43
+ will not include it.
44
+ """
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/realtime/session_updated_event.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Union
4
+ from typing_extensions import Literal, TypeAlias
5
+
6
+ from ..._models import BaseModel
7
+ from .realtime_session_create_request import RealtimeSessionCreateRequest
8
+ from .realtime_transcription_session_create_request import RealtimeTranscriptionSessionCreateRequest
9
+
10
+ __all__ = ["SessionUpdatedEvent", "Session"]
11
+
12
+ Session: TypeAlias = Union[RealtimeSessionCreateRequest, RealtimeTranscriptionSessionCreateRequest]
13
+
14
+
15
+ class SessionUpdatedEvent(BaseModel):
16
+ """
17
+ Returned when a session is updated with a `session.update` event, unless
18
+ there is an error.
19
+ """
20
+
21
+ event_id: str
22
+ """The unique ID of the server event."""
23
+
24
+ session: Session
25
+ """The session configuration."""
26
+
27
+ type: Literal["session.updated"]
28
+ """The event type, must be `session.updated`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/__init__.py ADDED
@@ -0,0 +1,330 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .tool import Tool as Tool
6
+ from .response import Response as Response
7
+ from .tool_param import ToolParam as ToolParam
8
+ from .custom_tool import CustomTool as CustomTool
9
+ from .local_skill import LocalSkill as LocalSkill
10
+ from .inline_skill import InlineSkill as InlineSkill
11
+ from .computer_tool import ComputerTool as ComputerTool
12
+ from .function_tool import FunctionTool as FunctionTool
13
+ from .response_item import ResponseItem as ResponseItem
14
+ from .container_auto import ContainerAuto as ContainerAuto
15
+ from .namespace_tool import NamespaceTool as NamespaceTool
16
+ from .response_error import ResponseError as ResponseError
17
+ from .response_input import ResponseInput as ResponseInput
18
+ from .response_usage import ResponseUsage as ResponseUsage
19
+ from .computer_action import ComputerAction as ComputerAction
20
+ from .parsed_response import (
21
+ ParsedContent as ParsedContent,
22
+ ParsedResponse as ParsedResponse,
23
+ ParsedResponseOutputItem as ParsedResponseOutputItem,
24
+ ParsedResponseOutputText as ParsedResponseOutputText,
25
+ ParsedResponseOutputMessage as ParsedResponseOutputMessage,
26
+ ParsedResponseFunctionToolCall as ParsedResponseFunctionToolCall,
27
+ )
28
+ from .response_prompt import ResponsePrompt as ResponsePrompt
29
+ from .response_status import ResponseStatus as ResponseStatus
30
+ from .skill_reference import SkillReference as SkillReference
31
+ from .tool_choice_mcp import ToolChoiceMcp as ToolChoiceMcp
32
+ from .web_search_tool import WebSearchTool as WebSearchTool
33
+ from .apply_patch_tool import ApplyPatchTool as ApplyPatchTool
34
+ from .file_search_tool import FileSearchTool as FileSearchTool
35
+ from .tool_search_tool import ToolSearchTool as ToolSearchTool
36
+ from .custom_tool_param import CustomToolParam as CustomToolParam
37
+ from .local_environment import LocalEnvironment as LocalEnvironment
38
+ from .local_skill_param import LocalSkillParam as LocalSkillParam
39
+ from .tool_choice_shell import ToolChoiceShell as ToolChoiceShell
40
+ from .tool_choice_types import ToolChoiceTypes as ToolChoiceTypes
41
+ from .compacted_response import CompactedResponse as CompactedResponse
42
+ from .easy_input_message import EasyInputMessage as EasyInputMessage
43
+ from .inline_skill_param import InlineSkillParam as InlineSkillParam
44
+ from .response_item_list import ResponseItemList as ResponseItemList
45
+ from .tool_choice_custom import ToolChoiceCustom as ToolChoiceCustom
46
+ from .computer_tool_param import ComputerToolParam as ComputerToolParam
47
+ from .container_reference import ContainerReference as ContainerReference
48
+ from .function_shell_tool import FunctionShellTool as FunctionShellTool
49
+ from .function_tool_param import FunctionToolParam as FunctionToolParam
50
+ from .inline_skill_source import InlineSkillSource as InlineSkillSource
51
+ from .response_includable import ResponseIncludable as ResponseIncludable
52
+ from .response_input_file import ResponseInputFile as ResponseInputFile
53
+ from .response_input_item import ResponseInputItem as ResponseInputItem
54
+ from .response_input_text import ResponseInputText as ResponseInputText
55
+ from .tool_choice_allowed import ToolChoiceAllowed as ToolChoiceAllowed
56
+ from .tool_choice_options import ToolChoiceOptions as ToolChoiceOptions
57
+ from .computer_action_list import ComputerActionList as ComputerActionList
58
+ from .container_auto_param import ContainerAutoParam as ContainerAutoParam
59
+ from .namespace_tool_param import NamespaceToolParam as NamespaceToolParam
60
+ from .response_error_event import ResponseErrorEvent as ResponseErrorEvent
61
+ from .response_input_audio import ResponseInputAudio as ResponseInputAudio
62
+ from .response_input_image import ResponseInputImage as ResponseInputImage
63
+ from .response_input_param import ResponseInputParam as ResponseInputParam
64
+ from .response_output_item import ResponseOutputItem as ResponseOutputItem
65
+ from .response_output_text import ResponseOutputText as ResponseOutputText
66
+ from .response_text_config import ResponseTextConfig as ResponseTextConfig
67
+ from .tool_choice_function import ToolChoiceFunction as ToolChoiceFunction
68
+ from .computer_action_param import ComputerActionParam as ComputerActionParam
69
+ from .response_failed_event import ResponseFailedEvent as ResponseFailedEvent
70
+ from .response_prompt_param import ResponsePromptParam as ResponsePromptParam
71
+ from .response_queued_event import ResponseQueuedEvent as ResponseQueuedEvent
72
+ from .response_stream_event import ResponseStreamEvent as ResponseStreamEvent
73
+ from .skill_reference_param import SkillReferenceParam as SkillReferenceParam
74
+ from .tool_choice_mcp_param import ToolChoiceMcpParam as ToolChoiceMcpParam
75
+ from .web_search_tool_param import WebSearchToolParam as WebSearchToolParam
76
+ from .apply_patch_tool_param import ApplyPatchToolParam as ApplyPatchToolParam
77
+ from .file_search_tool_param import FileSearchToolParam as FileSearchToolParam
78
+ from .input_item_list_params import InputItemListParams as InputItemListParams
79
+ from .response_create_params import ResponseCreateParams as ResponseCreateParams
80
+ from .response_created_event import ResponseCreatedEvent as ResponseCreatedEvent
81
+ from .response_input_content import ResponseInputContent as ResponseInputContent
82
+ from .responses_client_event import ResponsesClientEvent as ResponsesClientEvent
83
+ from .responses_server_event import ResponsesServerEvent as ResponsesServerEvent
84
+ from .tool_search_tool_param import ToolSearchToolParam as ToolSearchToolParam
85
+ from .local_environment_param import LocalEnvironmentParam as LocalEnvironmentParam
86
+ from .response_compact_params import ResponseCompactParams as ResponseCompactParams
87
+ from .response_output_message import ResponseOutputMessage as ResponseOutputMessage
88
+ from .response_output_refusal import ResponseOutputRefusal as ResponseOutputRefusal
89
+ from .response_reasoning_item import ResponseReasoningItem as ResponseReasoningItem
90
+ from .tool_choice_apply_patch import ToolChoiceApplyPatch as ToolChoiceApplyPatch
91
+ from .tool_choice_shell_param import ToolChoiceShellParam as ToolChoiceShellParam
92
+ from .tool_choice_types_param import ToolChoiceTypesParam as ToolChoiceTypesParam
93
+ from .web_search_preview_tool import WebSearchPreviewTool as WebSearchPreviewTool
94
+ from .easy_input_message_param import EasyInputMessageParam as EasyInputMessageParam
95
+ from .input_token_count_params import InputTokenCountParams as InputTokenCountParams
96
+ from .response_compaction_item import ResponseCompactionItem as ResponseCompactionItem
97
+ from .response_completed_event import ResponseCompletedEvent as ResponseCompletedEvent
98
+ from .response_retrieve_params import ResponseRetrieveParams as ResponseRetrieveParams
99
+ from .response_text_done_event import ResponseTextDoneEvent as ResponseTextDoneEvent
100
+ from .tool_choice_custom_param import ToolChoiceCustomParam as ToolChoiceCustomParam
101
+ from .computer_use_preview_tool import ComputerUsePreviewTool as ComputerUsePreviewTool
102
+ from .container_reference_param import ContainerReferenceParam as ContainerReferenceParam
103
+ from .function_shell_tool_param import FunctionShellToolParam as FunctionShellToolParam
104
+ from .inline_skill_source_param import InlineSkillSourceParam as InlineSkillSourceParam
105
+ from .response_audio_done_event import ResponseAudioDoneEvent as ResponseAudioDoneEvent
106
+ from .response_custom_tool_call import ResponseCustomToolCall as ResponseCustomToolCall
107
+ from .response_incomplete_event import ResponseIncompleteEvent as ResponseIncompleteEvent
108
+ from .response_input_file_param import ResponseInputFileParam as ResponseInputFileParam
109
+ from .response_input_item_param import ResponseInputItemParam as ResponseInputItemParam
110
+ from .response_input_text_param import ResponseInputTextParam as ResponseInputTextParam
111
+ from .response_text_delta_event import ResponseTextDeltaEvent as ResponseTextDeltaEvent
112
+ from .response_tool_search_call import ResponseToolSearchCall as ResponseToolSearchCall
113
+ from .tool_choice_allowed_param import ToolChoiceAllowedParam as ToolChoiceAllowedParam
114
+ from .computer_action_list_param import ComputerActionListParam as ComputerActionListParam
115
+ from .input_token_count_response import InputTokenCountResponse as InputTokenCountResponse
116
+ from .response_audio_delta_event import ResponseAudioDeltaEvent as ResponseAudioDeltaEvent
117
+ from .response_in_progress_event import ResponseInProgressEvent as ResponseInProgressEvent
118
+ from .response_input_audio_param import ResponseInputAudioParam as ResponseInputAudioParam
119
+ from .response_input_image_param import ResponseInputImageParam as ResponseInputImageParam
120
+ from .response_local_environment import ResponseLocalEnvironment as ResponseLocalEnvironment
121
+ from .response_output_text_param import ResponseOutputTextParam as ResponseOutputTextParam
122
+ from .response_text_config_param import ResponseTextConfigParam as ResponseTextConfigParam
123
+ from .tool_choice_function_param import ToolChoiceFunctionParam as ToolChoiceFunctionParam
124
+ from .response_computer_tool_call import ResponseComputerToolCall as ResponseComputerToolCall
125
+ from .response_conversation_param import ResponseConversationParam as ResponseConversationParam
126
+ from .response_format_text_config import ResponseFormatTextConfig as ResponseFormatTextConfig
127
+ from .response_function_tool_call import ResponseFunctionToolCall as ResponseFunctionToolCall
128
+ from .response_input_file_content import ResponseInputFileContent as ResponseInputFileContent
129
+ from .response_input_message_item import ResponseInputMessageItem as ResponseInputMessageItem
130
+ from .response_input_text_content import ResponseInputTextContent as ResponseInputTextContent
131
+ from .response_refusal_done_event import ResponseRefusalDoneEvent as ResponseRefusalDoneEvent
132
+ from .response_container_reference import ResponseContainerReference as ResponseContainerReference
133
+ from .response_function_web_search import ResponseFunctionWebSearch as ResponseFunctionWebSearch
134
+ from .response_input_content_param import ResponseInputContentParam as ResponseInputContentParam
135
+ from .response_input_image_content import ResponseInputImageContent as ResponseInputImageContent
136
+ from .response_refusal_delta_event import ResponseRefusalDeltaEvent as ResponseRefusalDeltaEvent
137
+ from .responses_client_event_param import ResponsesClientEventParam as ResponsesClientEventParam
138
+ from .response_output_message_param import ResponseOutputMessageParam as ResponseOutputMessageParam
139
+ from .response_output_refusal_param import ResponseOutputRefusalParam as ResponseOutputRefusalParam
140
+ from .response_reasoning_item_param import ResponseReasoningItemParam as ResponseReasoningItemParam
141
+ from .tool_choice_apply_patch_param import ToolChoiceApplyPatchParam as ToolChoiceApplyPatchParam
142
+ from .web_search_preview_tool_param import WebSearchPreviewToolParam as WebSearchPreviewToolParam
143
+ from .response_apply_patch_tool_call import ResponseApplyPatchToolCall as ResponseApplyPatchToolCall
144
+ from .response_compaction_item_param import ResponseCompactionItemParam as ResponseCompactionItemParam
145
+ from .response_custom_tool_call_item import ResponseCustomToolCallItem as ResponseCustomToolCallItem
146
+ from .response_file_search_tool_call import ResponseFileSearchToolCall as ResponseFileSearchToolCall
147
+ from .response_mcp_call_failed_event import ResponseMcpCallFailedEvent as ResponseMcpCallFailedEvent
148
+ from .computer_use_preview_tool_param import ComputerUsePreviewToolParam as ComputerUsePreviewToolParam
149
+ from .response_custom_tool_call_param import ResponseCustomToolCallParam as ResponseCustomToolCallParam
150
+ from .response_output_item_done_event import ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent
151
+ from .response_content_part_done_event import ResponseContentPartDoneEvent as ResponseContentPartDoneEvent
152
+ from .response_custom_tool_call_output import ResponseCustomToolCallOutput as ResponseCustomToolCallOutput
153
+ from .response_function_tool_call_item import ResponseFunctionToolCallItem as ResponseFunctionToolCallItem
154
+ from .response_output_item_added_event import ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent
155
+ from .response_tool_search_output_item import ResponseToolSearchOutputItem as ResponseToolSearchOutputItem
156
+ from .container_network_policy_disabled import ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled
157
+ from .response_computer_tool_call_param import ResponseComputerToolCallParam as ResponseComputerToolCallParam
158
+ from .response_content_part_added_event import ResponseContentPartAddedEvent as ResponseContentPartAddedEvent
159
+ from .response_conversation_param_param import ResponseConversationParamParam as ResponseConversationParamParam
160
+ from .response_format_text_config_param import ResponseFormatTextConfigParam as ResponseFormatTextConfigParam
161
+ from .response_function_shell_tool_call import ResponseFunctionShellToolCall as ResponseFunctionShellToolCall
162
+ from .response_function_tool_call_param import ResponseFunctionToolCallParam as ResponseFunctionToolCallParam
163
+ from .response_input_file_content_param import ResponseInputFileContentParam as ResponseInputFileContentParam
164
+ from .response_input_text_content_param import ResponseInputTextContentParam as ResponseInputTextContentParam
165
+ from .response_mcp_call_completed_event import ResponseMcpCallCompletedEvent as ResponseMcpCallCompletedEvent
166
+ from .container_network_policy_allowlist import ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist
167
+ from .response_function_call_output_item import ResponseFunctionCallOutputItem as ResponseFunctionCallOutputItem
168
+ from .response_function_web_search_param import ResponseFunctionWebSearchParam as ResponseFunctionWebSearchParam
169
+ from .response_input_image_content_param import ResponseInputImageContentParam as ResponseInputImageContentParam
170
+ from .response_reasoning_text_done_event import ResponseReasoningTextDoneEvent as ResponseReasoningTextDoneEvent
171
+ from .response_code_interpreter_tool_call import ResponseCodeInterpreterToolCall as ResponseCodeInterpreterToolCall
172
+ from .response_input_message_content_list import ResponseInputMessageContentList as ResponseInputMessageContentList
173
+ from .response_mcp_call_in_progress_event import ResponseMcpCallInProgressEvent as ResponseMcpCallInProgressEvent
174
+ from .response_reasoning_text_delta_event import ResponseReasoningTextDeltaEvent as ResponseReasoningTextDeltaEvent
175
+ from .response_audio_transcript_done_event import ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent
176
+ from .response_compaction_item_param_param import ResponseCompactionItemParamParam as ResponseCompactionItemParamParam
177
+ from .response_file_search_tool_call_param import ResponseFileSearchToolCallParam as ResponseFileSearchToolCallParam
178
+ from .response_mcp_list_tools_failed_event import ResponseMcpListToolsFailedEvent as ResponseMcpListToolsFailedEvent
179
+ from .response_apply_patch_tool_call_output import ResponseApplyPatchToolCallOutput as ResponseApplyPatchToolCallOutput
180
+ from .response_audio_transcript_delta_event import (
181
+ ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent,
182
+ )
183
+ from .response_custom_tool_call_output_item import ResponseCustomToolCallOutputItem as ResponseCustomToolCallOutputItem
184
+ from .container_network_policy_domain_secret import (
185
+ ContainerNetworkPolicyDomainSecret as ContainerNetworkPolicyDomainSecret,
186
+ )
187
+ from .response_custom_tool_call_output_param import (
188
+ ResponseCustomToolCallOutputParam as ResponseCustomToolCallOutputParam,
189
+ )
190
+ from .response_mcp_call_arguments_done_event import (
191
+ ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent,
192
+ )
193
+ from .response_tool_search_output_item_param import (
194
+ ResponseToolSearchOutputItemParam as ResponseToolSearchOutputItemParam,
195
+ )
196
+ from .container_network_policy_disabled_param import (
197
+ ContainerNetworkPolicyDisabledParam as ContainerNetworkPolicyDisabledParam,
198
+ )
199
+ from .response_computer_tool_call_output_item import (
200
+ ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem,
201
+ )
202
+ from .response_format_text_json_schema_config import (
203
+ ResponseFormatTextJSONSchemaConfig as ResponseFormatTextJSONSchemaConfig,
204
+ )
205
+ from .response_function_call_output_item_list import (
206
+ ResponseFunctionCallOutputItemList as ResponseFunctionCallOutputItemList,
207
+ )
208
+ from .response_function_tool_call_output_item import (
209
+ ResponseFunctionToolCallOutputItem as ResponseFunctionToolCallOutputItem,
210
+ )
211
+ from .response_image_gen_call_completed_event import (
212
+ ResponseImageGenCallCompletedEvent as ResponseImageGenCallCompletedEvent,
213
+ )
214
+ from .response_mcp_call_arguments_delta_event import (
215
+ ResponseMcpCallArgumentsDeltaEvent as ResponseMcpCallArgumentsDeltaEvent,
216
+ )
217
+ from .response_mcp_list_tools_completed_event import (
218
+ ResponseMcpListToolsCompletedEvent as ResponseMcpListToolsCompletedEvent,
219
+ )
220
+ from .container_network_policy_allowlist_param import (
221
+ ContainerNetworkPolicyAllowlistParam as ContainerNetworkPolicyAllowlistParam,
222
+ )
223
+ from .response_function_call_output_item_param import (
224
+ ResponseFunctionCallOutputItemParam as ResponseFunctionCallOutputItemParam,
225
+ )
226
+ from .response_function_shell_tool_call_output import (
227
+ ResponseFunctionShellToolCallOutput as ResponseFunctionShellToolCallOutput,
228
+ )
229
+ from .response_image_gen_call_generating_event import (
230
+ ResponseImageGenCallGeneratingEvent as ResponseImageGenCallGeneratingEvent,
231
+ )
232
+ from .response_web_search_call_completed_event import (
233
+ ResponseWebSearchCallCompletedEvent as ResponseWebSearchCallCompletedEvent,
234
+ )
235
+ from .response_web_search_call_searching_event import (
236
+ ResponseWebSearchCallSearchingEvent as ResponseWebSearchCallSearchingEvent,
237
+ )
238
+ from .response_code_interpreter_tool_call_param import (
239
+ ResponseCodeInterpreterToolCallParam as ResponseCodeInterpreterToolCallParam,
240
+ )
241
+ from .response_file_search_call_completed_event import (
242
+ ResponseFileSearchCallCompletedEvent as ResponseFileSearchCallCompletedEvent,
243
+ )
244
+ from .response_file_search_call_searching_event import (
245
+ ResponseFileSearchCallSearchingEvent as ResponseFileSearchCallSearchingEvent,
246
+ )
247
+ from .response_image_gen_call_in_progress_event import (
248
+ ResponseImageGenCallInProgressEvent as ResponseImageGenCallInProgressEvent,
249
+ )
250
+ from .response_input_message_content_list_param import (
251
+ ResponseInputMessageContentListParam as ResponseInputMessageContentListParam,
252
+ )
253
+ from .response_mcp_list_tools_in_progress_event import (
254
+ ResponseMcpListToolsInProgressEvent as ResponseMcpListToolsInProgressEvent,
255
+ )
256
+ from .response_custom_tool_call_input_done_event import (
257
+ ResponseCustomToolCallInputDoneEvent as ResponseCustomToolCallInputDoneEvent,
258
+ )
259
+ from .response_reasoning_summary_part_done_event import (
260
+ ResponseReasoningSummaryPartDoneEvent as ResponseReasoningSummaryPartDoneEvent,
261
+ )
262
+ from .response_reasoning_summary_text_done_event import (
263
+ ResponseReasoningSummaryTextDoneEvent as ResponseReasoningSummaryTextDoneEvent,
264
+ )
265
+ from .response_web_search_call_in_progress_event import (
266
+ ResponseWebSearchCallInProgressEvent as ResponseWebSearchCallInProgressEvent,
267
+ )
268
+ from .response_custom_tool_call_input_delta_event import (
269
+ ResponseCustomToolCallInputDeltaEvent as ResponseCustomToolCallInputDeltaEvent,
270
+ )
271
+ from .response_file_search_call_in_progress_event import (
272
+ ResponseFileSearchCallInProgressEvent as ResponseFileSearchCallInProgressEvent,
273
+ )
274
+ from .response_function_call_arguments_done_event import (
275
+ ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent,
276
+ )
277
+ from .response_function_shell_call_output_content import (
278
+ ResponseFunctionShellCallOutputContent as ResponseFunctionShellCallOutputContent,
279
+ )
280
+ from .response_image_gen_call_partial_image_event import (
281
+ ResponseImageGenCallPartialImageEvent as ResponseImageGenCallPartialImageEvent,
282
+ )
283
+ from .response_output_text_annotation_added_event import (
284
+ ResponseOutputTextAnnotationAddedEvent as ResponseOutputTextAnnotationAddedEvent,
285
+ )
286
+ from .response_reasoning_summary_part_added_event import (
287
+ ResponseReasoningSummaryPartAddedEvent as ResponseReasoningSummaryPartAddedEvent,
288
+ )
289
+ from .response_reasoning_summary_text_delta_event import (
290
+ ResponseReasoningSummaryTextDeltaEvent as ResponseReasoningSummaryTextDeltaEvent,
291
+ )
292
+ from .container_network_policy_domain_secret_param import (
293
+ ContainerNetworkPolicyDomainSecretParam as ContainerNetworkPolicyDomainSecretParam,
294
+ )
295
+ from .response_function_call_arguments_delta_event import (
296
+ ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent,
297
+ )
298
+ from .response_tool_search_output_item_param_param import (
299
+ ResponseToolSearchOutputItemParamParam as ResponseToolSearchOutputItemParamParam,
300
+ )
301
+ from .response_computer_tool_call_output_screenshot import (
302
+ ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot,
303
+ )
304
+ from .response_format_text_json_schema_config_param import (
305
+ ResponseFormatTextJSONSchemaConfigParam as ResponseFormatTextJSONSchemaConfigParam,
306
+ )
307
+ from .response_function_call_output_item_list_param import (
308
+ ResponseFunctionCallOutputItemListParam as ResponseFunctionCallOutputItemListParam,
309
+ )
310
+ from .response_code_interpreter_call_code_done_event import (
311
+ ResponseCodeInterpreterCallCodeDoneEvent as ResponseCodeInterpreterCallCodeDoneEvent,
312
+ )
313
+ from .response_code_interpreter_call_completed_event import (
314
+ ResponseCodeInterpreterCallCompletedEvent as ResponseCodeInterpreterCallCompletedEvent,
315
+ )
316
+ from .response_code_interpreter_call_code_delta_event import (
317
+ ResponseCodeInterpreterCallCodeDeltaEvent as ResponseCodeInterpreterCallCodeDeltaEvent,
318
+ )
319
+ from .response_code_interpreter_call_in_progress_event import (
320
+ ResponseCodeInterpreterCallInProgressEvent as ResponseCodeInterpreterCallInProgressEvent,
321
+ )
322
+ from .response_code_interpreter_call_interpreting_event import (
323
+ ResponseCodeInterpreterCallInterpretingEvent as ResponseCodeInterpreterCallInterpretingEvent,
324
+ )
325
+ from .response_function_shell_call_output_content_param import (
326
+ ResponseFunctionShellCallOutputContentParam as ResponseFunctionShellCallOutputContentParam,
327
+ )
328
+ from .response_computer_tool_call_output_screenshot_param import (
329
+ ResponseComputerToolCallOutputScreenshotParam as ResponseComputerToolCallOutputScreenshotParam,
330
+ )
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/apply_patch_tool.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ApplyPatchTool"]
8
+
9
+
10
+ class ApplyPatchTool(BaseModel):
11
+ """Allows the assistant to create, delete, or update files using unified diffs."""
12
+
13
+ type: Literal["apply_patch"]
14
+ """The type of the tool. Always `apply_patch`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/apply_patch_tool_param.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["ApplyPatchToolParam"]
8
+
9
+
10
+ class ApplyPatchToolParam(TypedDict, total=False):
11
+ """Allows the assistant to create, delete, or update files using unified diffs."""
12
+
13
+ type: Required[Literal["apply_patch"]]
14
+ """The type of the tool. Always `apply_patch`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/compacted_response.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+ from typing_extensions import Literal
5
+
6
+ from ..._models import BaseModel
7
+ from .response_usage import ResponseUsage
8
+ from .response_output_item import ResponseOutputItem
9
+
10
+ __all__ = ["CompactedResponse"]
11
+
12
+
13
+ class CompactedResponse(BaseModel):
14
+ id: str
15
+ """The unique identifier for the compacted response."""
16
+
17
+ created_at: int
18
+ """Unix timestamp (in seconds) when the compacted conversation was created."""
19
+
20
+ object: Literal["response.compaction"]
21
+ """The object type. Always `response.compaction`."""
22
+
23
+ output: List[ResponseOutputItem]
24
+ """The compacted list of output items.
25
+
26
+ This is a list of all user messages, followed by a single compaction item.
27
+ """
28
+
29
+ usage: ResponseUsage
30
+ """
31
+ Token accounting for the compaction pass, including cached, reasoning, and total
32
+ tokens.
33
+ """
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_action.py ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from typing_extensions import Literal, Annotated, TypeAlias
5
+
6
+ from ..._utils import PropertyInfo
7
+ from ..._models import BaseModel
8
+
9
+ __all__ = [
10
+ "ComputerAction",
11
+ "Click",
12
+ "DoubleClick",
13
+ "Drag",
14
+ "DragPath",
15
+ "Keypress",
16
+ "Move",
17
+ "Screenshot",
18
+ "Scroll",
19
+ "Type",
20
+ "Wait",
21
+ ]
22
+
23
+
24
+ class Click(BaseModel):
25
+ """A click action."""
26
+
27
+ button: Literal["left", "right", "wheel", "back", "forward"]
28
+ """Indicates which mouse button was pressed during the click.
29
+
30
+ One of `left`, `right`, `wheel`, `back`, or `forward`.
31
+ """
32
+
33
+ type: Literal["click"]
34
+ """Specifies the event type. For a click action, this property is always `click`."""
35
+
36
+ x: int
37
+ """The x-coordinate where the click occurred."""
38
+
39
+ y: int
40
+ """The y-coordinate where the click occurred."""
41
+
42
+ keys: Optional[List[str]] = None
43
+ """The keys being held while clicking."""
44
+
45
+
46
+ class DoubleClick(BaseModel):
47
+ """A double click action."""
48
+
49
+ keys: Optional[List[str]] = None
50
+ """The keys being held while double-clicking."""
51
+
52
+ type: Literal["double_click"]
53
+ """Specifies the event type.
54
+
55
+ For a double click action, this property is always set to `double_click`.
56
+ """
57
+
58
+ x: int
59
+ """The x-coordinate where the double click occurred."""
60
+
61
+ y: int
62
+ """The y-coordinate where the double click occurred."""
63
+
64
+
65
+ class DragPath(BaseModel):
66
+ """An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."""
67
+
68
+ x: int
69
+ """The x-coordinate."""
70
+
71
+ y: int
72
+ """The y-coordinate."""
73
+
74
+
75
+ class Drag(BaseModel):
76
+ """A drag action."""
77
+
78
+ path: List[DragPath]
79
+ """An array of coordinates representing the path of the drag action.
80
+
81
+ Coordinates will appear as an array of objects, eg
82
+
83
+ ```
84
+ [
85
+ { x: 100, y: 200 },
86
+ { x: 200, y: 300 }
87
+ ]
88
+ ```
89
+ """
90
+
91
+ type: Literal["drag"]
92
+ """Specifies the event type.
93
+
94
+ For a drag action, this property is always set to `drag`.
95
+ """
96
+
97
+ keys: Optional[List[str]] = None
98
+ """The keys being held while dragging the mouse."""
99
+
100
+
101
+ class Keypress(BaseModel):
102
+ """A collection of keypresses the model would like to perform."""
103
+
104
+ keys: List[str]
105
+ """The combination of keys the model is requesting to be pressed.
106
+
107
+ This is an array of strings, each representing a key.
108
+ """
109
+
110
+ type: Literal["keypress"]
111
+ """Specifies the event type.
112
+
113
+ For a keypress action, this property is always set to `keypress`.
114
+ """
115
+
116
+
117
+ class Move(BaseModel):
118
+ """A mouse move action."""
119
+
120
+ type: Literal["move"]
121
+ """Specifies the event type.
122
+
123
+ For a move action, this property is always set to `move`.
124
+ """
125
+
126
+ x: int
127
+ """The x-coordinate to move to."""
128
+
129
+ y: int
130
+ """The y-coordinate to move to."""
131
+
132
+ keys: Optional[List[str]] = None
133
+ """The keys being held while moving the mouse."""
134
+
135
+
136
+ class Screenshot(BaseModel):
137
+ """A screenshot action."""
138
+
139
+ type: Literal["screenshot"]
140
+ """Specifies the event type.
141
+
142
+ For a screenshot action, this property is always set to `screenshot`.
143
+ """
144
+
145
+
146
+ class Scroll(BaseModel):
147
+ """A scroll action."""
148
+
149
+ scroll_x: int
150
+ """The horizontal scroll distance."""
151
+
152
+ scroll_y: int
153
+ """The vertical scroll distance."""
154
+
155
+ type: Literal["scroll"]
156
+ """Specifies the event type.
157
+
158
+ For a scroll action, this property is always set to `scroll`.
159
+ """
160
+
161
+ x: int
162
+ """The x-coordinate where the scroll occurred."""
163
+
164
+ y: int
165
+ """The y-coordinate where the scroll occurred."""
166
+
167
+ keys: Optional[List[str]] = None
168
+ """The keys being held while scrolling."""
169
+
170
+
171
+ class Type(BaseModel):
172
+ """An action to type in text."""
173
+
174
+ text: str
175
+ """The text to type."""
176
+
177
+ type: Literal["type"]
178
+ """Specifies the event type.
179
+
180
+ For a type action, this property is always set to `type`.
181
+ """
182
+
183
+
184
+ class Wait(BaseModel):
185
+ """A wait action."""
186
+
187
+ type: Literal["wait"]
188
+ """Specifies the event type.
189
+
190
+ For a wait action, this property is always set to `wait`.
191
+ """
192
+
193
+
194
+ ComputerAction: TypeAlias = Annotated[
195
+ Union[Click, DoubleClick, Drag, Keypress, Move, Screenshot, Scroll, Type, Wait], PropertyInfo(discriminator="type")
196
+ ]
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_action_list.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List
4
+ from typing_extensions import TypeAlias
5
+
6
+ from .computer_action import ComputerAction
7
+
8
+ __all__ = ["ComputerActionList"]
9
+
10
+ ComputerActionList: TypeAlias = List[ComputerAction]
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_action_list_param.py ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List, Union, Iterable, Optional
6
+ from typing_extensions import Literal, Required, TypeAlias, TypedDict
7
+
8
+ from ..._types import SequenceNotStr
9
+
10
+ __all__ = [
11
+ "ComputerActionListParam",
12
+ "ComputerActionParam",
13
+ "Click",
14
+ "DoubleClick",
15
+ "Drag",
16
+ "DragPath",
17
+ "Keypress",
18
+ "Move",
19
+ "Screenshot",
20
+ "Scroll",
21
+ "Type",
22
+ "Wait",
23
+ ]
24
+
25
+
26
+ class Click(TypedDict, total=False):
27
+ """A click action."""
28
+
29
+ button: Required[Literal["left", "right", "wheel", "back", "forward"]]
30
+ """Indicates which mouse button was pressed during the click.
31
+
32
+ One of `left`, `right`, `wheel`, `back`, or `forward`.
33
+ """
34
+
35
+ type: Required[Literal["click"]]
36
+ """Specifies the event type. For a click action, this property is always `click`."""
37
+
38
+ x: Required[int]
39
+ """The x-coordinate where the click occurred."""
40
+
41
+ y: Required[int]
42
+ """The y-coordinate where the click occurred."""
43
+
44
+ keys: Optional[SequenceNotStr[str]]
45
+ """The keys being held while clicking."""
46
+
47
+
48
+ class DoubleClick(TypedDict, total=False):
49
+ """A double click action."""
50
+
51
+ keys: Required[Optional[SequenceNotStr[str]]]
52
+ """The keys being held while double-clicking."""
53
+
54
+ type: Required[Literal["double_click"]]
55
+ """Specifies the event type.
56
+
57
+ For a double click action, this property is always set to `double_click`.
58
+ """
59
+
60
+ x: Required[int]
61
+ """The x-coordinate where the double click occurred."""
62
+
63
+ y: Required[int]
64
+ """The y-coordinate where the double click occurred."""
65
+
66
+
67
+ class DragPath(TypedDict, total=False):
68
+ """An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."""
69
+
70
+ x: Required[int]
71
+ """The x-coordinate."""
72
+
73
+ y: Required[int]
74
+ """The y-coordinate."""
75
+
76
+
77
+ class Drag(TypedDict, total=False):
78
+ """A drag action."""
79
+
80
+ path: Required[Iterable[DragPath]]
81
+ """An array of coordinates representing the path of the drag action.
82
+
83
+ Coordinates will appear as an array of objects, eg
84
+
85
+ ```
86
+ [
87
+ { x: 100, y: 200 },
88
+ { x: 200, y: 300 }
89
+ ]
90
+ ```
91
+ """
92
+
93
+ type: Required[Literal["drag"]]
94
+ """Specifies the event type.
95
+
96
+ For a drag action, this property is always set to `drag`.
97
+ """
98
+
99
+ keys: Optional[SequenceNotStr[str]]
100
+ """The keys being held while dragging the mouse."""
101
+
102
+
103
+ class Keypress(TypedDict, total=False):
104
+ """A collection of keypresses the model would like to perform."""
105
+
106
+ keys: Required[SequenceNotStr[str]]
107
+ """The combination of keys the model is requesting to be pressed.
108
+
109
+ This is an array of strings, each representing a key.
110
+ """
111
+
112
+ type: Required[Literal["keypress"]]
113
+ """Specifies the event type.
114
+
115
+ For a keypress action, this property is always set to `keypress`.
116
+ """
117
+
118
+
119
+ class Move(TypedDict, total=False):
120
+ """A mouse move action."""
121
+
122
+ type: Required[Literal["move"]]
123
+ """Specifies the event type.
124
+
125
+ For a move action, this property is always set to `move`.
126
+ """
127
+
128
+ x: Required[int]
129
+ """The x-coordinate to move to."""
130
+
131
+ y: Required[int]
132
+ """The y-coordinate to move to."""
133
+
134
+ keys: Optional[SequenceNotStr[str]]
135
+ """The keys being held while moving the mouse."""
136
+
137
+
138
+ class Screenshot(TypedDict, total=False):
139
+ """A screenshot action."""
140
+
141
+ type: Required[Literal["screenshot"]]
142
+ """Specifies the event type.
143
+
144
+ For a screenshot action, this property is always set to `screenshot`.
145
+ """
146
+
147
+
148
+ class Scroll(TypedDict, total=False):
149
+ """A scroll action."""
150
+
151
+ scroll_x: Required[int]
152
+ """The horizontal scroll distance."""
153
+
154
+ scroll_y: Required[int]
155
+ """The vertical scroll distance."""
156
+
157
+ type: Required[Literal["scroll"]]
158
+ """Specifies the event type.
159
+
160
+ For a scroll action, this property is always set to `scroll`.
161
+ """
162
+
163
+ x: Required[int]
164
+ """The x-coordinate where the scroll occurred."""
165
+
166
+ y: Required[int]
167
+ """The y-coordinate where the scroll occurred."""
168
+
169
+ keys: Optional[SequenceNotStr[str]]
170
+ """The keys being held while scrolling."""
171
+
172
+
173
+ class Type(TypedDict, total=False):
174
+ """An action to type in text."""
175
+
176
+ text: Required[str]
177
+ """The text to type."""
178
+
179
+ type: Required[Literal["type"]]
180
+ """Specifies the event type.
181
+
182
+ For a type action, this property is always set to `type`.
183
+ """
184
+
185
+
186
+ class Wait(TypedDict, total=False):
187
+ """A wait action."""
188
+
189
+ type: Required[Literal["wait"]]
190
+ """Specifies the event type.
191
+
192
+ For a wait action, this property is always set to `wait`.
193
+ """
194
+
195
+
196
+ ComputerActionParam: TypeAlias = Union[Click, DoubleClick, Drag, Keypress, Move, Screenshot, Scroll, Type, Wait]
197
+
198
+ ComputerActionListParam: TypeAlias = List[ComputerActionParam]
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_action_param.py ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Iterable, Optional
6
+ from typing_extensions import Literal, Required, TypeAlias, TypedDict
7
+
8
+ from ..._types import SequenceNotStr
9
+
10
+ __all__ = [
11
+ "ComputerActionParam",
12
+ "Click",
13
+ "DoubleClick",
14
+ "Drag",
15
+ "DragPath",
16
+ "Keypress",
17
+ "Move",
18
+ "Screenshot",
19
+ "Scroll",
20
+ "Type",
21
+ "Wait",
22
+ ]
23
+
24
+
25
+ class Click(TypedDict, total=False):
26
+ """A click action."""
27
+
28
+ button: Required[Literal["left", "right", "wheel", "back", "forward"]]
29
+ """Indicates which mouse button was pressed during the click.
30
+
31
+ One of `left`, `right`, `wheel`, `back`, or `forward`.
32
+ """
33
+
34
+ type: Required[Literal["click"]]
35
+ """Specifies the event type. For a click action, this property is always `click`."""
36
+
37
+ x: Required[int]
38
+ """The x-coordinate where the click occurred."""
39
+
40
+ y: Required[int]
41
+ """The y-coordinate where the click occurred."""
42
+
43
+ keys: Optional[SequenceNotStr[str]]
44
+ """The keys being held while clicking."""
45
+
46
+
47
+ class DoubleClick(TypedDict, total=False):
48
+ """A double click action."""
49
+
50
+ keys: Required[Optional[SequenceNotStr[str]]]
51
+ """The keys being held while double-clicking."""
52
+
53
+ type: Required[Literal["double_click"]]
54
+ """Specifies the event type.
55
+
56
+ For a double click action, this property is always set to `double_click`.
57
+ """
58
+
59
+ x: Required[int]
60
+ """The x-coordinate where the double click occurred."""
61
+
62
+ y: Required[int]
63
+ """The y-coordinate where the double click occurred."""
64
+
65
+
66
+ class DragPath(TypedDict, total=False):
67
+ """An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`."""
68
+
69
+ x: Required[int]
70
+ """The x-coordinate."""
71
+
72
+ y: Required[int]
73
+ """The y-coordinate."""
74
+
75
+
76
+ class Drag(TypedDict, total=False):
77
+ """A drag action."""
78
+
79
+ path: Required[Iterable[DragPath]]
80
+ """An array of coordinates representing the path of the drag action.
81
+
82
+ Coordinates will appear as an array of objects, eg
83
+
84
+ ```
85
+ [
86
+ { x: 100, y: 200 },
87
+ { x: 200, y: 300 }
88
+ ]
89
+ ```
90
+ """
91
+
92
+ type: Required[Literal["drag"]]
93
+ """Specifies the event type.
94
+
95
+ For a drag action, this property is always set to `drag`.
96
+ """
97
+
98
+ keys: Optional[SequenceNotStr[str]]
99
+ """The keys being held while dragging the mouse."""
100
+
101
+
102
+ class Keypress(TypedDict, total=False):
103
+ """A collection of keypresses the model would like to perform."""
104
+
105
+ keys: Required[SequenceNotStr[str]]
106
+ """The combination of keys the model is requesting to be pressed.
107
+
108
+ This is an array of strings, each representing a key.
109
+ """
110
+
111
+ type: Required[Literal["keypress"]]
112
+ """Specifies the event type.
113
+
114
+ For a keypress action, this property is always set to `keypress`.
115
+ """
116
+
117
+
118
+ class Move(TypedDict, total=False):
119
+ """A mouse move action."""
120
+
121
+ type: Required[Literal["move"]]
122
+ """Specifies the event type.
123
+
124
+ For a move action, this property is always set to `move`.
125
+ """
126
+
127
+ x: Required[int]
128
+ """The x-coordinate to move to."""
129
+
130
+ y: Required[int]
131
+ """The y-coordinate to move to."""
132
+
133
+ keys: Optional[SequenceNotStr[str]]
134
+ """The keys being held while moving the mouse."""
135
+
136
+
137
+ class Screenshot(TypedDict, total=False):
138
+ """A screenshot action."""
139
+
140
+ type: Required[Literal["screenshot"]]
141
+ """Specifies the event type.
142
+
143
+ For a screenshot action, this property is always set to `screenshot`.
144
+ """
145
+
146
+
147
+ class Scroll(TypedDict, total=False):
148
+ """A scroll action."""
149
+
150
+ scroll_x: Required[int]
151
+ """The horizontal scroll distance."""
152
+
153
+ scroll_y: Required[int]
154
+ """The vertical scroll distance."""
155
+
156
+ type: Required[Literal["scroll"]]
157
+ """Specifies the event type.
158
+
159
+ For a scroll action, this property is always set to `scroll`.
160
+ """
161
+
162
+ x: Required[int]
163
+ """The x-coordinate where the scroll occurred."""
164
+
165
+ y: Required[int]
166
+ """The y-coordinate where the scroll occurred."""
167
+
168
+ keys: Optional[SequenceNotStr[str]]
169
+ """The keys being held while scrolling."""
170
+
171
+
172
+ class Type(TypedDict, total=False):
173
+ """An action to type in text."""
174
+
175
+ text: Required[str]
176
+ """The text to type."""
177
+
178
+ type: Required[Literal["type"]]
179
+ """Specifies the event type.
180
+
181
+ For a type action, this property is always set to `type`.
182
+ """
183
+
184
+
185
+ class Wait(TypedDict, total=False):
186
+ """A wait action."""
187
+
188
+ type: Required[Literal["wait"]]
189
+ """Specifies the event type.
190
+
191
+ For a wait action, this property is always set to `wait`.
192
+ """
193
+
194
+
195
+ ComputerActionParam: TypeAlias = Union[Click, DoubleClick, Drag, Keypress, Move, Screenshot, Scroll, Type, Wait]
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_tool.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ComputerTool"]
8
+
9
+
10
+ class ComputerTool(BaseModel):
11
+ """A tool that controls a virtual computer.
12
+
13
+ Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
14
+ """
15
+
16
+ type: Literal["computer"]
17
+ """The type of the computer tool. Always `computer`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_tool_param.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["ComputerToolParam"]
8
+
9
+
10
+ class ComputerToolParam(TypedDict, total=False):
11
+ """A tool that controls a virtual computer.
12
+
13
+ Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
14
+ """
15
+
16
+ type: Required[Literal["computer"]]
17
+ """The type of the computer tool. Always `computer`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_use_preview_tool.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ComputerUsePreviewTool"]
8
+
9
+
10
+ class ComputerUsePreviewTool(BaseModel):
11
+ """A tool that controls a virtual computer.
12
+
13
+ Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
14
+ """
15
+
16
+ display_height: int
17
+ """The height of the computer display."""
18
+
19
+ display_width: int
20
+ """The width of the computer display."""
21
+
22
+ environment: Literal["windows", "mac", "linux", "ubuntu", "browser"]
23
+ """The type of computer environment to control."""
24
+
25
+ type: Literal["computer_use_preview"]
26
+ """The type of the computer use tool. Always `computer_use_preview`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/computer_use_preview_tool_param.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["ComputerUsePreviewToolParam"]
8
+
9
+
10
+ class ComputerUsePreviewToolParam(TypedDict, total=False):
11
+ """A tool that controls a virtual computer.
12
+
13
+ Learn more about the [computer tool](https://platform.openai.com/docs/guides/tools-computer-use).
14
+ """
15
+
16
+ display_height: Required[int]
17
+ """The height of the computer display."""
18
+
19
+ display_width: Required[int]
20
+ """The width of the computer display."""
21
+
22
+ environment: Required[Literal["windows", "mac", "linux", "ubuntu", "browser"]]
23
+ """The type of computer environment to control."""
24
+
25
+ type: Required[Literal["computer_use_preview"]]
26
+ """The type of the computer use tool. Always `computer_use_preview`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_auto.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from typing_extensions import Literal, Annotated, TypeAlias
5
+
6
+ from ..._utils import PropertyInfo
7
+ from ..._models import BaseModel
8
+ from .inline_skill import InlineSkill
9
+ from .skill_reference import SkillReference
10
+ from .container_network_policy_disabled import ContainerNetworkPolicyDisabled
11
+ from .container_network_policy_allowlist import ContainerNetworkPolicyAllowlist
12
+
13
+ __all__ = ["ContainerAuto", "NetworkPolicy", "Skill"]
14
+
15
+ NetworkPolicy: TypeAlias = Annotated[
16
+ Union[ContainerNetworkPolicyDisabled, ContainerNetworkPolicyAllowlist], PropertyInfo(discriminator="type")
17
+ ]
18
+
19
+ Skill: TypeAlias = Annotated[Union[SkillReference, InlineSkill], PropertyInfo(discriminator="type")]
20
+
21
+
22
+ class ContainerAuto(BaseModel):
23
+ type: Literal["container_auto"]
24
+ """Automatically creates a container for this request"""
25
+
26
+ file_ids: Optional[List[str]] = None
27
+ """An optional list of uploaded files to make available to your code."""
28
+
29
+ memory_limit: Optional[Literal["1g", "4g", "16g", "64g"]] = None
30
+ """The memory limit for the container."""
31
+
32
+ network_policy: Optional[NetworkPolicy] = None
33
+ """Network access policy for the container."""
34
+
35
+ skills: Optional[List[Skill]] = None
36
+ """An optional list of skills referenced by id or inline data."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_auto_param.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Iterable, Optional
6
+ from typing_extensions import Literal, Required, TypeAlias, TypedDict
7
+
8
+ from ..._types import SequenceNotStr
9
+ from .inline_skill_param import InlineSkillParam
10
+ from .skill_reference_param import SkillReferenceParam
11
+ from .container_network_policy_disabled_param import ContainerNetworkPolicyDisabledParam
12
+ from .container_network_policy_allowlist_param import ContainerNetworkPolicyAllowlistParam
13
+
14
+ __all__ = ["ContainerAutoParam", "NetworkPolicy", "Skill"]
15
+
16
+ NetworkPolicy: TypeAlias = Union[ContainerNetworkPolicyDisabledParam, ContainerNetworkPolicyAllowlistParam]
17
+
18
+ Skill: TypeAlias = Union[SkillReferenceParam, InlineSkillParam]
19
+
20
+
21
+ class ContainerAutoParam(TypedDict, total=False):
22
+ type: Required[Literal["container_auto"]]
23
+ """Automatically creates a container for this request"""
24
+
25
+ file_ids: SequenceNotStr[str]
26
+ """An optional list of uploaded files to make available to your code."""
27
+
28
+ memory_limit: Optional[Literal["1g", "4g", "16g", "64g"]]
29
+ """The memory limit for the container."""
30
+
31
+ network_policy: NetworkPolicy
32
+ """Network access policy for the container."""
33
+
34
+ skills: Iterable[Skill]
35
+ """An optional list of skills referenced by id or inline data."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_network_policy_allowlist.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from ..._models import BaseModel
7
+ from .container_network_policy_domain_secret import ContainerNetworkPolicyDomainSecret
8
+
9
+ __all__ = ["ContainerNetworkPolicyAllowlist"]
10
+
11
+
12
+ class ContainerNetworkPolicyAllowlist(BaseModel):
13
+ allowed_domains: List[str]
14
+ """A list of allowed domains when type is `allowlist`."""
15
+
16
+ type: Literal["allowlist"]
17
+ """Allow outbound network access only to specified domains. Always `allowlist`."""
18
+
19
+ domain_secrets: Optional[List[ContainerNetworkPolicyDomainSecret]] = None
20
+ """Optional domain-scoped secrets for allowlisted domains."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_network_policy_allowlist_param.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Iterable
6
+ from typing_extensions import Literal, Required, TypedDict
7
+
8
+ from ..._types import SequenceNotStr
9
+ from .container_network_policy_domain_secret_param import ContainerNetworkPolicyDomainSecretParam
10
+
11
+ __all__ = ["ContainerNetworkPolicyAllowlistParam"]
12
+
13
+
14
+ class ContainerNetworkPolicyAllowlistParam(TypedDict, total=False):
15
+ allowed_domains: Required[SequenceNotStr[str]]
16
+ """A list of allowed domains when type is `allowlist`."""
17
+
18
+ type: Required[Literal["allowlist"]]
19
+ """Allow outbound network access only to specified domains. Always `allowlist`."""
20
+
21
+ domain_secrets: Iterable[ContainerNetworkPolicyDomainSecretParam]
22
+ """Optional domain-scoped secrets for allowlisted domains."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_network_policy_disabled.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ContainerNetworkPolicyDisabled"]
8
+
9
+
10
+ class ContainerNetworkPolicyDisabled(BaseModel):
11
+ type: Literal["disabled"]
12
+ """Disable outbound network access. Always `disabled`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_network_policy_disabled_param.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["ContainerNetworkPolicyDisabledParam"]
8
+
9
+
10
+ class ContainerNetworkPolicyDisabledParam(TypedDict, total=False):
11
+ type: Required[Literal["disabled"]]
12
+ """Disable outbound network access. Always `disabled`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_reference.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal
4
+
5
+ from ..._models import BaseModel
6
+
7
+ __all__ = ["ContainerReference"]
8
+
9
+
10
+ class ContainerReference(BaseModel):
11
+ container_id: str
12
+ """The ID of the referenced container."""
13
+
14
+ type: Literal["container_reference"]
15
+ """References a container created with the /v1/containers endpoint"""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/container_reference_param.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ __all__ = ["ContainerReferenceParam"]
8
+
9
+
10
+ class ContainerReferenceParam(TypedDict, total=False):
11
+ container_id: Required[str]
12
+ """The ID of the referenced container."""
13
+
14
+ type: Required[Literal["container_reference"]]
15
+ """References a container created with the /v1/containers endpoint"""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/custom_tool.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Optional
4
+ from typing_extensions import Literal
5
+
6
+ from ..._models import BaseModel
7
+ from ..shared.custom_tool_input_format import CustomToolInputFormat
8
+
9
+ __all__ = ["CustomTool"]
10
+
11
+
12
+ class CustomTool(BaseModel):
13
+ """A custom tool that processes input using a specified format.
14
+
15
+ Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)
16
+ """
17
+
18
+ name: str
19
+ """The name of the custom tool, used to identify it in tool calls."""
20
+
21
+ type: Literal["custom"]
22
+ """The type of the custom tool. Always `custom`."""
23
+
24
+ defer_loading: Optional[bool] = None
25
+ """Whether this tool should be deferred and discovered via tool search."""
26
+
27
+ description: Optional[str] = None
28
+ """Optional description of the custom tool, used to provide more context."""
29
+
30
+ format: Optional[CustomToolInputFormat] = None
31
+ """The input format for the custom tool. Default is unconstrained text."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/custom_tool_param.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Literal, Required, TypedDict
6
+
7
+ from ..shared_params.custom_tool_input_format import CustomToolInputFormat
8
+
9
+ __all__ = ["CustomToolParam"]
10
+
11
+
12
+ class CustomToolParam(TypedDict, total=False):
13
+ """A custom tool that processes input using a specified format.
14
+
15
+ Learn more about [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools)
16
+ """
17
+
18
+ name: Required[str]
19
+ """The name of the custom tool, used to identify it in tool calls."""
20
+
21
+ type: Required[Literal["custom"]]
22
+ """The type of the custom tool. Always `custom`."""
23
+
24
+ defer_loading: bool
25
+ """Whether this tool should be deferred and discovered via tool search."""
26
+
27
+ description: str
28
+ """Optional description of the custom tool, used to provide more context."""
29
+
30
+ format: CustomToolInputFormat
31
+ """The input format for the custom tool. Default is unconstrained text."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/easy_input_message.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Union, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from ..._models import BaseModel
7
+ from .response_input_message_content_list import ResponseInputMessageContentList
8
+
9
+ __all__ = ["EasyInputMessage"]
10
+
11
+
12
+ class EasyInputMessage(BaseModel):
13
+ """
14
+ A message input to the model with a role indicating instruction following
15
+ hierarchy. Instructions given with the `developer` or `system` role take
16
+ precedence over instructions given with the `user` role. Messages with the
17
+ `assistant` role are presumed to have been generated by the model in previous
18
+ interactions.
19
+ """
20
+
21
+ content: Union[str, ResponseInputMessageContentList]
22
+ """
23
+ Text, image, or audio input to the model, used to generate a response. Can also
24
+ contain previous assistant responses.
25
+ """
26
+
27
+ role: Literal["user", "assistant", "system", "developer"]
28
+ """The role of the message input.
29
+
30
+ One of `user`, `assistant`, `system`, or `developer`.
31
+ """
32
+
33
+ phase: Optional[Literal["commentary", "final_answer"]] = None
34
+ """
35
+ Labels an `assistant` message as intermediate commentary (`commentary`) or the
36
+ final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when
37
+ sending follow-up requests, preserve and resend phase on all assistant messages
38
+ — dropping it can degrade performance. Not used for user messages.
39
+ """
40
+
41
+ type: Optional[Literal["message"]] = None
42
+ """The type of the message input. Always `message`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/easy_input_message_param.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Optional
6
+ from typing_extensions import Literal, Required, TypedDict
7
+
8
+ from .response_input_message_content_list_param import ResponseInputMessageContentListParam
9
+
10
+ __all__ = ["EasyInputMessageParam"]
11
+
12
+
13
+ class EasyInputMessageParam(TypedDict, total=False):
14
+ """
15
+ A message input to the model with a role indicating instruction following
16
+ hierarchy. Instructions given with the `developer` or `system` role take
17
+ precedence over instructions given with the `user` role. Messages with the
18
+ `assistant` role are presumed to have been generated by the model in previous
19
+ interactions.
20
+ """
21
+
22
+ content: Required[Union[str, ResponseInputMessageContentListParam]]
23
+ """
24
+ Text, image, or audio input to the model, used to generate a response. Can also
25
+ contain previous assistant responses.
26
+ """
27
+
28
+ role: Required[Literal["user", "assistant", "system", "developer"]]
29
+ """The role of the message input.
30
+
31
+ One of `user`, `assistant`, `system`, or `developer`.
32
+ """
33
+
34
+ phase: Optional[Literal["commentary", "final_answer"]]
35
+ """
36
+ Labels an `assistant` message as intermediate commentary (`commentary`) or the
37
+ final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when
38
+ sending follow-up requests, preserve and resend phase on all assistant messages
39
+ — dropping it can degrade performance. Not used for user messages.
40
+ """
41
+
42
+ type: Literal["message"]
43
+ """The type of the message input. Always `message`."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/file_search_tool.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import List, Union, Optional
4
+ from typing_extensions import Literal, TypeAlias
5
+
6
+ from ..._models import BaseModel
7
+ from ..shared.compound_filter import CompoundFilter
8
+ from ..shared.comparison_filter import ComparisonFilter
9
+
10
+ __all__ = ["FileSearchTool", "Filters", "RankingOptions", "RankingOptionsHybridSearch"]
11
+
12
+ Filters: TypeAlias = Union[ComparisonFilter, CompoundFilter, None]
13
+
14
+
15
+ class RankingOptionsHybridSearch(BaseModel):
16
+ """
17
+ Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
18
+ """
19
+
20
+ embedding_weight: float
21
+ """The weight of the embedding in the reciprocal ranking fusion."""
22
+
23
+ text_weight: float
24
+ """The weight of the text in the reciprocal ranking fusion."""
25
+
26
+
27
+ class RankingOptions(BaseModel):
28
+ """Ranking options for search."""
29
+
30
+ hybrid_search: Optional[RankingOptionsHybridSearch] = None
31
+ """
32
+ Weights that control how reciprocal rank fusion balances semantic embedding
33
+ matches versus sparse keyword matches when hybrid search is enabled.
34
+ """
35
+
36
+ ranker: Optional[Literal["auto", "default-2024-11-15"]] = None
37
+ """The ranker to use for the file search."""
38
+
39
+ score_threshold: Optional[float] = None
40
+ """The score threshold for the file search, a number between 0 and 1.
41
+
42
+ Numbers closer to 1 will attempt to return only the most relevant results, but
43
+ may return fewer results.
44
+ """
45
+
46
+
47
+ class FileSearchTool(BaseModel):
48
+ """A tool that searches for relevant content from uploaded files.
49
+
50
+ Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).
51
+ """
52
+
53
+ type: Literal["file_search"]
54
+ """The type of the file search tool. Always `file_search`."""
55
+
56
+ vector_store_ids: List[str]
57
+ """The IDs of the vector stores to search."""
58
+
59
+ filters: Optional[Filters] = None
60
+ """A filter to apply."""
61
+
62
+ max_num_results: Optional[int] = None
63
+ """The maximum number of results to return.
64
+
65
+ This number should be between 1 and 50 inclusive.
66
+ """
67
+
68
+ ranking_options: Optional[RankingOptions] = None
69
+ """Ranking options for search."""
workspace/outputs/audit_venv/lib/python3.11/site-packages/openai/types/responses/file_search_tool_param.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Union, Optional
6
+ from typing_extensions import Literal, Required, TypeAlias, TypedDict
7
+
8
+ from ..._types import SequenceNotStr
9
+ from ..shared_params.compound_filter import CompoundFilter
10
+ from ..shared_params.comparison_filter import ComparisonFilter
11
+
12
+ __all__ = ["FileSearchToolParam", "Filters", "RankingOptions", "RankingOptionsHybridSearch"]
13
+
14
+ Filters: TypeAlias = Union[ComparisonFilter, CompoundFilter]
15
+
16
+
17
+ class RankingOptionsHybridSearch(TypedDict, total=False):
18
+ """
19
+ Weights that control how reciprocal rank fusion balances semantic embedding matches versus sparse keyword matches when hybrid search is enabled.
20
+ """
21
+
22
+ embedding_weight: Required[float]
23
+ """The weight of the embedding in the reciprocal ranking fusion."""
24
+
25
+ text_weight: Required[float]
26
+ """The weight of the text in the reciprocal ranking fusion."""
27
+
28
+
29
+ class RankingOptions(TypedDict, total=False):
30
+ """Ranking options for search."""
31
+
32
+ hybrid_search: RankingOptionsHybridSearch
33
+ """
34
+ Weights that control how reciprocal rank fusion balances semantic embedding
35
+ matches versus sparse keyword matches when hybrid search is enabled.
36
+ """
37
+
38
+ ranker: Literal["auto", "default-2024-11-15"]
39
+ """The ranker to use for the file search."""
40
+
41
+ score_threshold: float
42
+ """The score threshold for the file search, a number between 0 and 1.
43
+
44
+ Numbers closer to 1 will attempt to return only the most relevant results, but
45
+ may return fewer results.
46
+ """
47
+
48
+
49
+ class FileSearchToolParam(TypedDict, total=False):
50
+ """A tool that searches for relevant content from uploaded files.
51
+
52
+ Learn more about the [file search tool](https://platform.openai.com/docs/guides/tools-file-search).
53
+ """
54
+
55
+ type: Required[Literal["file_search"]]
56
+ """The type of the file search tool. Always `file_search`."""
57
+
58
+ vector_store_ids: Required[SequenceNotStr[str]]
59
+ """The IDs of the vector stores to search."""
60
+
61
+ filters: Optional[Filters]
62
+ """A filter to apply."""
63
+
64
+ max_num_results: int
65
+ """The maximum number of results to return.
66
+
67
+ This number should be between 1 and 50 inclusive.
68
+ """
69
+
70
+ ranking_options: RankingOptions
71
+ """Ranking options for search."""