@xyd-js/opensdk-python 0.0.0-build-f0c10f6-20260703195526
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/LICENSE +21 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin_api_keys__create/input.json +325 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin_api_keys__create/output.py +26 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin_api_keys__delete/input.json +201 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin_api_keys__delete/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin_api_keys__list/input.json +400 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin_api_keys__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin_api_keys__retrieve/input.json +304 -0
- package/__fixtures__/-2.complex.openai/admin__organization__admin_api_keys__retrieve/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__audit_logs__list/input.json +2602 -0
- package/__fixtures__/-2.complex.openai/admin__organization__audit_logs__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__activate__create/input.json +308 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__activate__create/output.py +32 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__create/input.json +308 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__create/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__deactivate__create/input.json +308 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__deactivate__create/output.py +32 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__delete/input.json +196 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__delete/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__list/input.json +356 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__retrieve/input.json +300 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__retrieve/output.py +30 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__update/input.json +310 -0
- package/__fixtures__/-2.complex.openai/admin__organization__certificates__update/output.py +30 -0
- package/__fixtures__/-2.complex.openai/admin__organization__costs__list/input.json +1062 -0
- package/__fixtures__/-2.complex.openai/admin__organization__costs__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__create/input.json +239 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__create/output.py +26 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__delete/input.json +206 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__delete/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__list/input.json +316 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__create/input.json +364 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__create/output.py +34 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__delete/input.json +210 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__delete/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__list/input.json +398 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__roles__list/output.py +37 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__update/input.json +241 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__update/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__create/input.json +237 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__create/output.py +34 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__delete/input.json +211 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__delete/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__list/input.json +314 -0
- package/__fixtures__/-2.complex.openai/admin__organization__groups__users__list/output.py +37 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__create/input.json +386 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__create/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__delete/input.json +203 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__delete/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__list/input.json +414 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__retrieve/input.json +337 -0
- package/__fixtures__/-2.complex.openai/admin__organization__invites__retrieve/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api_keys__delete/input.json +279 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api_keys__delete/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api_keys__list/input.json +475 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api_keys__list/output.py +37 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api_keys__retrieve/input.json +400 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__api_keys__retrieve/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__archive/input.json +247 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__archive/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__activate__create/input.json +324 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__activate__create/output.py +40 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__deactivate__create/input.json +324 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__deactivate__create/output.py +40 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__list/input.json +372 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__certificates__list/output.py +37 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__create/input.json +281 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__create/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__create/input.json +274 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__create/output.py +34 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__delete/input.json +211 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__delete/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__list/input.json +342 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__groups__list/output.py +37 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__list/input.json +330 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__rate_limits__list_rate_limits/input.json +358 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__rate_limits__list_rate_limits/output.py +37 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__rate_limits__update_rate_limit/input.json +407 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__rate_limits__update_rate_limit/output.py +38 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__retrieve/input.json +247 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__retrieve/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service_accounts__create/input.json +372 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service_accounts__create/output.py +34 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service_accounts__delete/input.json +216 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service_accounts__delete/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service_accounts__list/input.json +391 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service_accounts__list/output.py +37 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service_accounts__retrieve/input.json +253 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__service_accounts__retrieve/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__update/input.json +356 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__update/output.py +30 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__create/input.json +349 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__create/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__delete/input.json +279 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__delete/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__list/input.json +387 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__list/output.py +37 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__retrieve/input.json +250 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__retrieve/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__update/input.json +339 -0
- package/__fixtures__/-2.complex.openai/admin__organization__projects__users__update/output.py +38 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__create/input.json +283 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__create/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__delete/input.json +206 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__delete/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__list/input.json +338 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__update/input.json +296 -0
- package/__fixtures__/-2.complex.openai/admin__organization__roles__update/output.py +30 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__audio_speeches__list/input.json +1108 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__audio_speeches__list/output.py +35 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__audio_transcriptions__list/input.json +1108 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__audio_transcriptions__list/output.py +35 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__code_interpreter_sessions__list/input.json +1054 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__code_interpreter_sessions__list/output.py +35 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__completions__list/input.json +1123 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__completions__list/output.py +35 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__embeddings__list/input.json +1108 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__embeddings__list/output.py +35 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__images__list/input.json +1176 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__images__list/output.py +35 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__moderations__list/input.json +1108 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__moderations__list/output.py +35 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__vector_stores__list/input.json +1054 -0
- package/__fixtures__/-2.complex.openai/admin__organization__usage__vector_stores__list/output.py +35 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__delete/input.json +202 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__delete/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__list/input.json +557 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__retrieve/input.json +472 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__retrieve/output.py +28 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__create/input.json +611 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__create/output.py +34 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__delete/input.json +210 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__delete/output.py +36 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__list/input.json +398 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__roles__list/output.py +37 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__update/input.json +528 -0
- package/__fixtures__/-2.complex.openai/admin__organization__users__update/output.py +30 -0
- package/__fixtures__/-2.complex.openai/audio__speech__create/input.json +388 -0
- package/__fixtures__/-2.complex.openai/audio__speech__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/audio__transcriptions__create/input.json +999 -0
- package/__fixtures__/-2.complex.openai/audio__transcriptions__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/audio__translations__create/input.json +430 -0
- package/__fixtures__/-2.complex.openai/audio__translations__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__create/input.json +244 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__delete/input.json +190 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__delete/output.py +22 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__list/input.json +285 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__list/output.py +23 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__retrieve/input.json +212 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__retrieve/output.py +22 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__update/input.json +236 -0
- package/__fixtures__/-2.complex.openai/audio__voice_consents__update/output.py +22 -0
- package/__fixtures__/-2.complex.openai/audio__voices__create/input.json +235 -0
- package/__fixtures__/-2.complex.openai/audio__voices__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/batches__cancel/input.json +594 -0
- package/__fixtures__/-2.complex.openai/batches__cancel/output.py +16 -0
- package/__fixtures__/-2.complex.openai/batches__create/input.json +701 -0
- package/__fixtures__/-2.complex.openai/batches__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/batches__list/input.json +665 -0
- package/__fixtures__/-2.complex.openai/batches__list/output.py +17 -0
- package/__fixtures__/-2.complex.openai/batches__retrieve/input.json +594 -0
- package/__fixtures__/-2.complex.openai/batches__retrieve/output.py +16 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__create/input.json +1029 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__delete/input.json +190 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__delete/output.py +22 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__list/input.json +796 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__list/output.py +23 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__retrieve/input.json +694 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__retrieve/output.py +22 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__update/input.json +1045 -0
- package/__fixtures__/-2.complex.openai/beta__assistants__update/output.py +24 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__sessions__cancel/input.json +482 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__sessions__cancel/output.py +28 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__sessions__create/input.json +738 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__sessions__create/output.py +28 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__threads__delete/input.json +200 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__threads__delete/output.py +28 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__threads__items__list/input.json +1218 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__threads__items__list/output.py +37 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__threads__list/input.json +444 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__threads__list/output.py +29 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__threads__retrieve/input.json +328 -0
- package/__fixtures__/-2.complex.openai/beta__chat_kit__threads__retrieve/output.py +28 -0
- package/__fixtures__/-2.complex.openai/beta__threads__create/input.json +665 -0
- package/__fixtures__/-2.complex.openai/beta__threads__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/beta__threads__delete/input.json +189 -0
- package/__fixtures__/-2.complex.openai/beta__threads__delete/output.py +22 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__create/input.json +938 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__create/output.py +30 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__delete/input.json +203 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__delete/output.py +30 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__list/input.json +945 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__list/output.py +31 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__retrieve/input.json +832 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__retrieve/output.py +30 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__update/input.json +855 -0
- package/__fixtures__/-2.complex.openai/beta__threads__messages__update/output.py +32 -0
- package/__fixtures__/-2.complex.openai/beta__threads__new_and_run/input.json +1899 -0
- package/__fixtures__/-2.complex.openai/beta__threads__new_and_run/output.py +22 -0
- package/__fixtures__/-2.complex.openai/beta__threads__retrieve/input.json +283 -0
- package/__fixtures__/-2.complex.openai/beta__threads__retrieve/output.py +22 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__cancel/input.json +1181 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__cancel/output.py +30 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__create/input.json +1851 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__create/output.py +30 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__list/input.json +1285 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__list/output.py +31 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__retrieve/input.json +1181 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__retrieve/output.py +30 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__steps__list/input.json +1066 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__steps__list/output.py +39 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__steps__retrieve/input.json +964 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__steps__retrieve/output.py +40 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__submit_tool_outputs__create/input.json +1246 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__submit_tool_outputs__create/output.py +38 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__update/input.json +1204 -0
- package/__fixtures__/-2.complex.openai/beta__threads__runs__update/output.py +32 -0
- package/__fixtures__/-2.complex.openai/beta__threads__update/input.json +315 -0
- package/__fixtures__/-2.complex.openai/beta__threads__update/output.py +24 -0
- package/__fixtures__/-2.complex.openai/chat__completions__create/input.json +3325 -0
- package/__fixtures__/-2.complex.openai/chat__completions__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/chat__completions__delete/input.json +192 -0
- package/__fixtures__/-2.complex.openai/chat__completions__delete/output.py +22 -0
- package/__fixtures__/-2.complex.openai/chat__completions__list/input.json +1069 -0
- package/__fixtures__/-2.complex.openai/chat__completions__list/output.py +23 -0
- package/__fixtures__/-2.complex.openai/chat__completions__messages__list/input.json +770 -0
- package/__fixtures__/-2.complex.openai/chat__completions__messages__list/output.py +31 -0
- package/__fixtures__/-2.complex.openai/chat__completions__retrieve/input.json +938 -0
- package/__fixtures__/-2.complex.openai/chat__completions__retrieve/output.py +22 -0
- package/__fixtures__/-2.complex.openai/chat__completions__update/input.json +973 -0
- package/__fixtures__/-2.complex.openai/chat__completions__update/output.py +22 -0
- package/__fixtures__/-2.complex.openai/completions__create/input.json +788 -0
- package/__fixtures__/-2.complex.openai/completions__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/containers__create/input.json +671 -0
- package/__fixtures__/-2.complex.openai/containers__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/containers__delete/input.json +142 -0
- package/__fixtures__/-2.complex.openai/containers__delete/output.py +16 -0
- package/__fixtures__/-2.complex.openai/containers__files__content/input.json +154 -0
- package/__fixtures__/-2.complex.openai/containers__files__content/output.py +24 -0
- package/__fixtures__/-2.complex.openai/containers__files__create/input.json +261 -0
- package/__fixtures__/-2.complex.openai/containers__files__create/output.py +24 -0
- package/__fixtures__/-2.complex.openai/containers__files__delete/input.json +154 -0
- package/__fixtures__/-2.complex.openai/containers__files__delete/output.py +24 -0
- package/__fixtures__/-2.complex.openai/containers__files__list/input.json +337 -0
- package/__fixtures__/-2.complex.openai/containers__files__list/output.py +25 -0
- package/__fixtures__/-2.complex.openai/containers__files__retrieve/input.json +235 -0
- package/__fixtures__/-2.complex.openai/containers__files__retrieve/output.py +24 -0
- package/__fixtures__/-2.complex.openai/containers__list/input.json +438 -0
- package/__fixtures__/-2.complex.openai/containers__list/output.py +17 -0
- package/__fixtures__/-2.complex.openai/containers__retrieve/input.json +329 -0
- package/__fixtures__/-2.complex.openai/containers__retrieve/output.py +16 -0
- package/__fixtures__/-2.complex.openai/conversations__create/input.json +6737 -0
- package/__fixtures__/-2.complex.openai/conversations__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/conversations__delete/input.json +186 -0
- package/__fixtures__/-2.complex.openai/conversations__delete/output.py +16 -0
- package/__fixtures__/-2.complex.openai/conversations__items__create/input.json +8352 -0
- package/__fixtures__/-2.complex.openai/conversations__items__create/output.py +25 -0
- package/__fixtures__/-2.complex.openai/conversations__items__delete/input.json +213 -0
- package/__fixtures__/-2.complex.openai/conversations__items__delete/output.py +24 -0
- package/__fixtures__/-2.complex.openai/conversations__items__list/input.json +6695 -0
- package/__fixtures__/-2.complex.openai/conversations__items__list/output.py +25 -0
- package/__fixtures__/-2.complex.openai/conversations__items__retrieve/input.json +6597 -0
- package/__fixtures__/-2.complex.openai/conversations__items__retrieve/output.py +26 -0
- package/__fixtures__/-2.complex.openai/conversations__retrieve/input.json +198 -0
- package/__fixtures__/-2.complex.openai/conversations__retrieve/output.py +16 -0
- package/__fixtures__/-2.complex.openai/conversations__update/input.json +233 -0
- package/__fixtures__/-2.complex.openai/conversations__update/output.py +16 -0
- package/__fixtures__/-2.complex.openai/embeddings__create/input.json +395 -0
- package/__fixtures__/-2.complex.openai/embeddings__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/evals__create/input.json +1424 -0
- package/__fixtures__/-2.complex.openai/evals__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/evals__delete/input.json +232 -0
- package/__fixtures__/-2.complex.openai/evals__delete/output.py +16 -0
- package/__fixtures__/-2.complex.openai/evals__list/input.json +1251 -0
- package/__fixtures__/-2.complex.openai/evals__list/output.py +17 -0
- package/__fixtures__/-2.complex.openai/evals__retrieve/input.json +1127 -0
- package/__fixtures__/-2.complex.openai/evals__retrieve/output.py +16 -0
- package/__fixtures__/-2.complex.openai/evals__runs__cancel/input.json +4445 -0
- package/__fixtures__/-2.complex.openai/evals__runs__cancel/output.py +24 -0
- package/__fixtures__/-2.complex.openai/evals__runs__create/input.json +4526 -0
- package/__fixtures__/-2.complex.openai/evals__runs__create/output.py +24 -0
- package/__fixtures__/-2.complex.openai/evals__runs__delete/input.json +246 -0
- package/__fixtures__/-2.complex.openai/evals__runs__delete/output.py +24 -0
- package/__fixtures__/-2.complex.openai/evals__runs__list/input.json +4579 -0
- package/__fixtures__/-2.complex.openai/evals__runs__list/output.py +25 -0
- package/__fixtures__/-2.complex.openai/evals__runs__output_items__list/input.json +685 -0
- package/__fixtures__/-2.complex.openai/evals__runs__output_items__list/output.py +33 -0
- package/__fixtures__/-2.complex.openai/evals__runs__output_items__retrieve/input.json +560 -0
- package/__fixtures__/-2.complex.openai/evals__runs__output_items__retrieve/output.py +32 -0
- package/__fixtures__/-2.complex.openai/evals__runs__retrieve/input.json +4445 -0
- package/__fixtures__/-2.complex.openai/evals__runs__retrieve/output.py +24 -0
- package/__fixtures__/-2.complex.openai/evals__update/input.json +1160 -0
- package/__fixtures__/-2.complex.openai/evals__update/output.py +18 -0
- package/__fixtures__/-2.complex.openai/files__content/input.json +151 -0
- package/__fixtures__/-2.complex.openai/files__content/output.py +16 -0
- package/__fixtures__/-2.complex.openai/files__create/input.json +379 -0
- package/__fixtures__/-2.complex.openai/files__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/files__delete/input.json +184 -0
- package/__fixtures__/-2.complex.openai/files__delete/output.py +16 -0
- package/__fixtures__/-2.complex.openai/files__list/input.json +397 -0
- package/__fixtures__/-2.complex.openai/files__list/output.py +17 -0
- package/__fixtures__/-2.complex.openai/files__retrieve/input.json +295 -0
- package/__fixtures__/-2.complex.openai/files__retrieve/output.py +16 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__alpha__graders__run__create/input.json +1225 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__alpha__graders__run__create/output.py +34 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__alpha__graders__validate__create/input.json +991 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__alpha__graders__validate__create/output.py +32 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__checkpoints__permissions__create/input.json +297 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__checkpoints__permissions__create/output.py +29 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__checkpoints__permissions__delete/input.json +208 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__checkpoints__permissions__delete/output.py +30 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__checkpoints__permissions__list/input.json +325 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__checkpoints__permissions__list/output.py +31 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__cancel/input.json +1645 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__cancel/output.py +22 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__checkpoints__list/input.json +383 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__checkpoints__list/output.py +31 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__create/input.json +1887 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__list/input.json +1714 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__list/output.py +23 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__list_events/input.json +330 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__list_events/output.py +25 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__pause/input.json +1645 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__pause/output.py +22 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__resume/input.json +1645 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__resume/output.py +22 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__retrieve/input.json +1645 -0
- package/__fixtures__/-2.complex.openai/fine_tuning__jobs__retrieve/output.py +22 -0
- package/__fixtures__/-2.complex.openai/images__edits__create/input.json +744 -0
- package/__fixtures__/-2.complex.openai/images__edits__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/images__generations__create/input.json +789 -0
- package/__fixtures__/-2.complex.openai/images__generations__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/images__variations__create/input.json +550 -0
- package/__fixtures__/-2.complex.openai/images__variations__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/models__delete/input.json +184 -0
- package/__fixtures__/-2.complex.openai/models__delete/output.py +16 -0
- package/__fixtures__/-2.complex.openai/models__list/input.json +221 -0
- package/__fixtures__/-2.complex.openai/models__list/output.py +15 -0
- package/__fixtures__/-2.complex.openai/models__retrieve/input.json +199 -0
- package/__fixtures__/-2.complex.openai/models__retrieve/output.py +16 -0
- package/__fixtures__/-2.complex.openai/moderations__create/input.json +831 -0
- package/__fixtures__/-2.complex.openai/moderations__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/projects__groups__roles__create/input.json +368 -0
- package/__fixtures__/-2.complex.openai/projects__groups__roles__create/output.py +30 -0
- package/__fixtures__/-2.complex.openai/projects__groups__roles__delete/input.json +214 -0
- package/__fixtures__/-2.complex.openai/projects__groups__roles__delete/output.py +32 -0
- package/__fixtures__/-2.complex.openai/projects__groups__roles__list/input.json +402 -0
- package/__fixtures__/-2.complex.openai/projects__groups__roles__list/output.py +33 -0
- package/__fixtures__/-2.complex.openai/projects__roles__create/input.json +289 -0
- package/__fixtures__/-2.complex.openai/projects__roles__create/output.py +24 -0
- package/__fixtures__/-2.complex.openai/projects__roles__delete/input.json +210 -0
- package/__fixtures__/-2.complex.openai/projects__roles__delete/output.py +24 -0
- package/__fixtures__/-2.complex.openai/projects__roles__list/input.json +344 -0
- package/__fixtures__/-2.complex.openai/projects__roles__list/output.py +25 -0
- package/__fixtures__/-2.complex.openai/projects__roles__update/input.json +300 -0
- package/__fixtures__/-2.complex.openai/projects__roles__update/output.py +26 -0
- package/__fixtures__/-2.complex.openai/projects__users__roles__create/input.json +615 -0
- package/__fixtures__/-2.complex.openai/projects__users__roles__create/output.py +30 -0
- package/__fixtures__/-2.complex.openai/projects__users__roles__delete/input.json +214 -0
- package/__fixtures__/-2.complex.openai/projects__users__roles__delete/output.py +32 -0
- package/__fixtures__/-2.complex.openai/projects__users__roles__list/input.json +402 -0
- package/__fixtures__/-2.complex.openai/projects__users__roles__list/output.py +33 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__accept/input.json +1768 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__accept/output.py +24 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__create/input.json +1790 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__hangup/input.json +147 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__hangup/output.py +22 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__refer/input.json +175 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__refer/output.py +22 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__reject/input.json +175 -0
- package/__fixtures__/-2.complex.openai/realtime__calls__reject/output.py +24 -0
- package/__fixtures__/-2.complex.openai/realtime__client_secrets__create/input.json +2407 -0
- package/__fixtures__/-2.complex.openai/realtime__client_secrets__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/realtime__sessions__create/input.json +1400 -0
- package/__fixtures__/-2.complex.openai/realtime__sessions__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/realtime__transcription_sessions__create/input.json +562 -0
- package/__fixtures__/-2.complex.openai/realtime__transcription_sessions__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/realtime__translations__client_secrets__create/input.json +498 -0
- package/__fixtures__/-2.complex.openai/realtime__translations__client_secrets__create/output.py +28 -0
- package/__fixtures__/-2.complex.openai/responses__cancel/input.json +9526 -0
- package/__fixtures__/-2.complex.openai/responses__cancel/output.py +16 -0
- package/__fixtures__/-2.complex.openai/responses__compact__create/input.json +8721 -0
- package/__fixtures__/-2.complex.openai/responses__compact__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/responses__create/input.json +9862 -0
- package/__fixtures__/-2.complex.openai/responses__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/responses__delete/input.json +194 -0
- package/__fixtures__/-2.complex.openai/responses__delete/output.py +16 -0
- package/__fixtures__/-2.complex.openai/responses__input_items__list/input.json +6686 -0
- package/__fixtures__/-2.complex.openai/responses__input_items__list/output.py +25 -0
- package/__fixtures__/-2.complex.openai/responses__input_tokens__count/input.json +7368 -0
- package/__fixtures__/-2.complex.openai/responses__input_tokens__count/output.py +22 -0
- package/__fixtures__/-2.complex.openai/responses__retrieve/input.json +9550 -0
- package/__fixtures__/-2.complex.openai/responses__retrieve/output.py +18 -0
- package/__fixtures__/-2.complex.openai/skills__content/input.json +152 -0
- package/__fixtures__/-2.complex.openai/skills__content/output.py +16 -0
- package/__fixtures__/-2.complex.openai/skills__create/input.json +258 -0
- package/__fixtures__/-2.complex.openai/skills__create/output.py +14 -0
- package/__fixtures__/-2.complex.openai/skills__delete/input.json +186 -0
- package/__fixtures__/-2.complex.openai/skills__delete/output.py +16 -0
- package/__fixtures__/-2.complex.openai/skills__list/input.json +323 -0
- package/__fixtures__/-2.complex.openai/skills__list/output.py +17 -0
- package/__fixtures__/-2.complex.openai/skills__retrieve/input.json +226 -0
- package/__fixtures__/-2.complex.openai/skills__retrieve/output.py +16 -0
- package/__fixtures__/-2.complex.openai/skills__update/input.json +251 -0
- package/__fixtures__/-2.complex.openai/skills__update/output.py +16 -0
- package/__fixtures__/-2.complex.openai/skills__versions__content/input.json +166 -0
- package/__fixtures__/-2.complex.openai/skills__versions__content/output.py +24 -0
- package/__fixtures__/-2.complex.openai/skills__versions__create/input.json +284 -0
- package/__fixtures__/-2.complex.openai/skills__versions__create/output.py +24 -0
- package/__fixtures__/-2.complex.openai/skills__versions__delete/input.json +209 -0
- package/__fixtures__/-2.complex.openai/skills__versions__delete/output.py +24 -0
- package/__fixtures__/-2.complex.openai/skills__versions__list/input.json +341 -0
- package/__fixtures__/-2.complex.openai/skills__versions__list/output.py +25 -0
- package/__fixtures__/-2.complex.openai/skills__versions__retrieve/input.json +240 -0
- package/__fixtures__/-2.complex.openai/skills__versions__retrieve/output.py +24 -0
- package/__fixtures__/-2.complex.openai/uploads__cancel/input.json +407 -0
- package/__fixtures__/-2.complex.openai/uploads__cancel/output.py +16 -0
- package/__fixtures__/-2.complex.openai/uploads__complete/input.json +443 -0
- package/__fixtures__/-2.complex.openai/uploads__complete/output.py +18 -0
- package/__fixtures__/-2.complex.openai/uploads__create/input.json +501 -0
- package/__fixtures__/-2.complex.openai/uploads__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/uploads__parts__create/input.json +229 -0
- package/__fixtures__/-2.complex.openai/uploads__parts__create/output.py +24 -0
- package/__fixtures__/-2.complex.openai/vector_stores__create/input.json +507 -0
- package/__fixtures__/-2.complex.openai/vector_stores__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/vector_stores__delete/input.json +184 -0
- package/__fixtures__/-2.complex.openai/vector_stores__delete/output.py +16 -0
- package/__fixtures__/-2.complex.openai/vector_stores__file_batches__cancel/input.json +300 -0
- package/__fixtures__/-2.complex.openai/vector_stores__file_batches__cancel/output.py +24 -0
- package/__fixtures__/-2.complex.openai/vector_stores__file_batches__create/input.json +314 -0
- package/__fixtures__/-2.complex.openai/vector_stores__file_batches__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/vector_stores__file_batches__list_files/input.json +571 -0
- package/__fixtures__/-2.complex.openai/vector_stores__file_batches__list_files/output.py +27 -0
- package/__fixtures__/-2.complex.openai/vector_stores__file_batches__retrieve/input.json +302 -0
- package/__fixtures__/-2.complex.openai/vector_stores__file_batches__retrieve/output.py +24 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__content/input.json +249 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__content/output.py +25 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__create/input.json +527 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__create/output.py +24 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__delete/input.json +198 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__delete/output.py +24 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__list/input.json +562 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__list/output.py +25 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__retrieve/input.json +432 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__retrieve/output.py +24 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__update/input.json +455 -0
- package/__fixtures__/-2.complex.openai/vector_stores__files__update/output.py +24 -0
- package/__fixtures__/-2.complex.openai/vector_stores__list/input.json +468 -0
- package/__fixtures__/-2.complex.openai/vector_stores__list/output.py +17 -0
- package/__fixtures__/-2.complex.openai/vector_stores__retrieve/input.json +366 -0
- package/__fixtures__/-2.complex.openai/vector_stores__retrieve/output.py +16 -0
- package/__fixtures__/-2.complex.openai/vector_stores__search/input.json +637 -0
- package/__fixtures__/-2.complex.openai/vector_stores__search/output.py +19 -0
- package/__fixtures__/-2.complex.openai/vector_stores__update/input.json +409 -0
- package/__fixtures__/-2.complex.openai/vector_stores__update/output.py +18 -0
- package/__fixtures__/-2.complex.openai/videos__characters__create/input.json +216 -0
- package/__fixtures__/-2.complex.openai/videos__characters__create/output.py +22 -0
- package/__fixtures__/-2.complex.openai/videos__characters__retrieve/input.json +193 -0
- package/__fixtures__/-2.complex.openai/videos__characters__retrieve/output.py +22 -0
- package/__fixtures__/-2.complex.openai/videos__create/input.json +465 -0
- package/__fixtures__/-2.complex.openai/videos__create/output.py +16 -0
- package/__fixtures__/-2.complex.openai/videos__delete/input.json +190 -0
- package/__fixtures__/-2.complex.openai/videos__delete/output.py +16 -0
- package/__fixtures__/-2.complex.openai/videos__download_content/input.json +181 -0
- package/__fixtures__/-2.complex.openai/videos__download_content/output.py +18 -0
- package/__fixtures__/-2.complex.openai/videos__edits__create/input.json +422 -0
- package/__fixtures__/-2.complex.openai/videos__edits__create/output.py +20 -0
- package/__fixtures__/-2.complex.openai/videos__extensions__create/input.json +446 -0
- package/__fixtures__/-2.complex.openai/videos__extensions__create/output.py +20 -0
- package/__fixtures__/-2.complex.openai/videos__list/input.json +477 -0
- package/__fixtures__/-2.complex.openai/videos__list/output.py +17 -0
- package/__fixtures__/-2.complex.openai/videos__remix/input.json +405 -0
- package/__fixtures__/-2.complex.openai/videos__remix/output.py +16 -0
- package/__fixtures__/-2.complex.openai/videos__retrieve/input.json +380 -0
- package/__fixtures__/-2.complex.openai/videos__retrieve/output.py +16 -0
- package/__fixtures__/1.basic/input.json +249 -0
- package/__fixtures__/1.basic/output/petstore/__init__.py +6 -0
- package/__fixtures__/1.basic/output/petstore/_client.py +21 -0
- package/__fixtures__/1.basic/output/petstore/_pagination.py +42 -0
- package/__fixtures__/1.basic/output/petstore/_transport.py +391 -0
- package/__fixtures__/1.basic/output/petstore/models.py +33 -0
- package/__fixtures__/1.basic/output/petstore/resources.py +25 -0
- package/__fixtures__/1.basic/output/pyproject.toml +12 -0
- package/__fixtures__/1.basic/output/tests/conftest.py +16 -0
- package/__fixtures__/1.basic/output/tests/test_pets.py +36 -0
- package/__fixtures__/1.basic/output/tests/utils.py +28 -0
- package/__fixtures__/2.wire/input.json +351 -0
- package/__fixtures__/2.wire/output/pyproject.toml +12 -0
- package/__fixtures__/2.wire/output/tests/conftest.py +16 -0
- package/__fixtures__/2.wire/output/tests/test_items.py +18 -0
- package/__fixtures__/2.wire/output/tests/test_tokens.py +17 -0
- package/__fixtures__/2.wire/output/tests/test_uploads.py +27 -0
- package/__fixtures__/2.wire/output/tests/utils.py +28 -0
- package/__fixtures__/2.wire/output/wire_service/__init__.py +6 -0
- package/__fixtures__/2.wire/output/wire_service/_client.py +23 -0
- package/__fixtures__/2.wire/output/wire_service/_pagination.py +42 -0
- package/__fixtures__/2.wire/output/wire_service/_transport.py +391 -0
- package/__fixtures__/2.wire/output/wire_service/models.py +44 -0
- package/__fixtures__/2.wire/output/wire_service/resources.py +38 -0
- package/__tests__/docs.test.ts +115 -0
- package/__tests__/e2e/harness.ts +79 -0
- package/__tests__/e2e/openai.test.ts +14 -0
- package/__tests__/e2e/publish.test.ts +19 -0
- package/__tests__/opensdk-python.test.ts +134 -0
- package/__tests__/utils.ts +117 -0
- package/biome.json +25 -0
- package/dist/index.cjs +1274 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +32 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +1246 -0
- package/dist/index.js.map +1 -0
- package/index.ts +1 -0
- package/package.json +30 -0
- package/src/emitter.ts +95 -0
- package/src/example-py.ts +60 -0
- package/src/index.ts +4 -0
- package/src/method.ts +13 -0
- package/src/naming.ts +45 -0
- package/src/project.ts +446 -0
- package/src/publish.ts +22 -0
- package/src/pytype.ts +86 -0
- package/src/runtime.ts +551 -0
- package/src/tests-py.ts +197 -0
- package/src/types.ts +8 -0
- package/tsconfig.json +18 -0
- package/tsup.config.ts +19 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Code generated by opensdk. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Any, Optional
|
|
6
|
+
|
|
7
|
+
from ._transport import Transport, decode
|
|
8
|
+
from .models import * # noqa: F401,F403
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RealtimeResource:
|
|
12
|
+
def __init__(self, transport: Transport) -> None:
|
|
13
|
+
self._transport = transport
|
|
14
|
+
self.sessions = RealtimeSessionsResource(transport)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class RealtimeSessionsResource:
|
|
18
|
+
def __init__(self, transport: Transport) -> None:
|
|
19
|
+
self._transport = transport
|
|
20
|
+
|
|
21
|
+
def create(self, *, client_secret: RealtimeSessionCreateRequestClientSecret, modalities: Optional[Any] = None, instructions: Optional[str] = None, voice: Optional[VoiceIdsOrCustomVoice] = None, input_audio_format: Optional[str] = None, output_audio_format: Optional[str] = None, input_audio_transcription: Optional[RealtimeSessionCreateRequestInputAudioTranscription] = None, speed: Optional[float] = None, tracing: Optional[RealtimeSessionCreateRequestTracing] = None, turn_detection: Optional[RealtimeSessionCreateRequestTurnDetection] = None, tools: Optional[list[RealtimeSessionCreateRequestToolsItem]] = None, tool_choice: Optional[str] = None, temperature: Optional[float] = None, max_response_output_tokens: Optional[RealtimeSessionCreateRequestMaxResponseOutputTokens] = None, truncation: Optional[RealtimeTruncation] = None, prompt: Optional[Prompt] = None) -> RealtimeSessionCreateResponse:
|
|
22
|
+
return decode(RealtimeSessionCreateResponse, self._transport.request("POST", "/realtime/sessions", body={"client_secret": client_secret, "modalities": modalities, "instructions": instructions, "voice": voice, "input_audio_format": input_audio_format, "output_audio_format": output_audio_format, "input_audio_transcription": input_audio_transcription, "speed": speed, "tracing": tracing, "turn_detection": turn_detection, "tools": tools, "tool_choice": tool_choice, "temperature": temperature, "max_response_output_tokens": max_response_output_tokens, "truncation": truncation, "prompt": prompt}))
|
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
{
|
|
2
|
+
"opensdk": "1.0.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "openai",
|
|
5
|
+
"version": "2.3.0"
|
|
6
|
+
},
|
|
7
|
+
"servers": [
|
|
8
|
+
"https://api.openai.com/v1"
|
|
9
|
+
],
|
|
10
|
+
"security": [
|
|
11
|
+
{
|
|
12
|
+
"type": "http",
|
|
13
|
+
"kind": "bearer",
|
|
14
|
+
"schemeName": "ApiKeyAuth",
|
|
15
|
+
"envVar": "OPENAI_API_KEY",
|
|
16
|
+
"scheme": "bearer"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"type": "http",
|
|
20
|
+
"kind": "bearer",
|
|
21
|
+
"schemeName": "AdminApiKeyAuth",
|
|
22
|
+
"envVar": "OPENAI_API_KEY",
|
|
23
|
+
"scheme": "bearer"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"types": [
|
|
27
|
+
{
|
|
28
|
+
"name": "RealtimeTranscriptionSessionCreateRequest",
|
|
29
|
+
"kind": "struct",
|
|
30
|
+
"fields": [
|
|
31
|
+
{
|
|
32
|
+
"name": "turn_detection",
|
|
33
|
+
"type": {
|
|
34
|
+
"kind": "ref",
|
|
35
|
+
"name": "RealtimeTranscriptionSessionCreateRequestTurnDetection"
|
|
36
|
+
},
|
|
37
|
+
"required": false,
|
|
38
|
+
"description": "Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.\n"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "input_audio_noise_reduction",
|
|
42
|
+
"type": {
|
|
43
|
+
"kind": "ref",
|
|
44
|
+
"name": "RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction"
|
|
45
|
+
},
|
|
46
|
+
"required": false,
|
|
47
|
+
"default": null,
|
|
48
|
+
"description": "Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.\n"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "input_audio_format",
|
|
52
|
+
"type": {
|
|
53
|
+
"kind": "ref",
|
|
54
|
+
"name": "RealtimeTranscriptionSessionCreateRequestInputAudioFormat"
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"default": "pcm16",
|
|
58
|
+
"description": "The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.\n"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "input_audio_transcription",
|
|
62
|
+
"type": {
|
|
63
|
+
"kind": "ref",
|
|
64
|
+
"name": "AudioTranscription"
|
|
65
|
+
},
|
|
66
|
+
"required": false
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "include",
|
|
70
|
+
"type": {
|
|
71
|
+
"kind": "array",
|
|
72
|
+
"items": {
|
|
73
|
+
"kind": "scalar",
|
|
74
|
+
"scalar": "string",
|
|
75
|
+
"const": "item.input_audio_transcription.logprobs"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": false,
|
|
79
|
+
"description": "The set of items to include in the transcription. Current available items are:\n`item.input_audio_transcription.logprobs`\n"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"description": "Realtime transcription session object configuration."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "RealtimeTranscriptionSessionCreateRequestTurnDetection",
|
|
86
|
+
"kind": "struct",
|
|
87
|
+
"fields": [
|
|
88
|
+
{
|
|
89
|
+
"name": "type",
|
|
90
|
+
"type": {
|
|
91
|
+
"kind": "scalar",
|
|
92
|
+
"scalar": "string",
|
|
93
|
+
"const": "server_vad"
|
|
94
|
+
},
|
|
95
|
+
"required": false,
|
|
96
|
+
"description": "Type of turn detection. Only `server_vad` is currently supported for transcription sessions.\n"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "threshold",
|
|
100
|
+
"type": {
|
|
101
|
+
"kind": "scalar",
|
|
102
|
+
"scalar": "number"
|
|
103
|
+
},
|
|
104
|
+
"required": false,
|
|
105
|
+
"description": "Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.\n"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "prefix_padding_ms",
|
|
109
|
+
"type": {
|
|
110
|
+
"kind": "scalar",
|
|
111
|
+
"scalar": "integer"
|
|
112
|
+
},
|
|
113
|
+
"required": false,
|
|
114
|
+
"description": "Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.\n"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "silence_duration_ms",
|
|
118
|
+
"type": {
|
|
119
|
+
"kind": "scalar",
|
|
120
|
+
"scalar": "integer"
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"description": "Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.\n"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"description": "Configuration for turn detection. Can be set to `null` to turn off. Server VAD means that the model will detect the start and end of speech based on audio volume and respond at the end of user speech.\n"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction",
|
|
130
|
+
"kind": "struct",
|
|
131
|
+
"fields": [
|
|
132
|
+
{
|
|
133
|
+
"name": "type",
|
|
134
|
+
"type": {
|
|
135
|
+
"kind": "ref",
|
|
136
|
+
"name": "NoiseReductionType"
|
|
137
|
+
},
|
|
138
|
+
"required": false
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"description": "Configuration for input audio noise reduction. This can be set to `null` to turn off.\nNoise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.\nFiltering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.\n"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "NoiseReductionType",
|
|
145
|
+
"kind": "enum",
|
|
146
|
+
"base": "string",
|
|
147
|
+
"values": [
|
|
148
|
+
{
|
|
149
|
+
"value": "near_field"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"value": "far_field"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"description": "Type of noise reduction. `near_field` is for close-talking microphones such as headphones, `far_field` is for far-field microphones such as laptop or conference room microphones.\n"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "RealtimeTranscriptionSessionCreateRequestInputAudioFormat",
|
|
159
|
+
"kind": "enum",
|
|
160
|
+
"base": "string",
|
|
161
|
+
"values": [
|
|
162
|
+
{
|
|
163
|
+
"value": "pcm16"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"value": "g711_ulaw"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"value": "g711_alaw"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"description": "The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\nFor `pcm16`, input audio must be 16-bit PCM at a 24kHz sample rate,\nsingle channel (mono), and little-endian byte order.\n"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "AudioTranscription",
|
|
176
|
+
"kind": "struct",
|
|
177
|
+
"fields": [
|
|
178
|
+
{
|
|
179
|
+
"name": "model",
|
|
180
|
+
"type": {
|
|
181
|
+
"kind": "ref",
|
|
182
|
+
"name": "AudioTranscriptionModel"
|
|
183
|
+
},
|
|
184
|
+
"required": false,
|
|
185
|
+
"description": "The model to use for transcription. Current options are `whisper-1`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.\n"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "language",
|
|
189
|
+
"type": {
|
|
190
|
+
"kind": "scalar",
|
|
191
|
+
"scalar": "string"
|
|
192
|
+
},
|
|
193
|
+
"required": false,
|
|
194
|
+
"description": "The language of the input audio. Supplying the input language in\n[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g. `en`) format\nwill improve accuracy and latency.\n"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "prompt",
|
|
198
|
+
"type": {
|
|
199
|
+
"kind": "scalar",
|
|
200
|
+
"scalar": "string"
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"description": "An optional text to guide the model's style or continue a previous audio\nsegment.\nFor `whisper-1`, the [prompt is a list of keywords](/docs/guides/speech-to-text#prompting).\nFor `gpt-4o-transcribe` models (excluding `gpt-4o-transcribe-diarize`), the prompt is a free text string, for example \"expect words related to technology\".\nPrompt is not supported with `gpt-realtime-whisper` in GA Realtime sessions.\n"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "delay",
|
|
207
|
+
"type": {
|
|
208
|
+
"kind": "ref",
|
|
209
|
+
"name": "AudioTranscriptionDelay"
|
|
210
|
+
},
|
|
211
|
+
"required": false,
|
|
212
|
+
"description": "Controls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.\n"
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "AudioTranscriptionModel",
|
|
218
|
+
"kind": "union",
|
|
219
|
+
"semantics": "anyOf",
|
|
220
|
+
"variants": [
|
|
221
|
+
{
|
|
222
|
+
"kind": "scalar",
|
|
223
|
+
"scalar": "string"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"kind": "ref",
|
|
227
|
+
"name": "AudioTranscriptionModelString"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"description": "The model to use for transcription. Current options are `whisper-1`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.\n"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "AudioTranscriptionModelString",
|
|
234
|
+
"kind": "enum",
|
|
235
|
+
"base": "string",
|
|
236
|
+
"values": [
|
|
237
|
+
{
|
|
238
|
+
"value": "whisper-1"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"value": "gpt-4o-mini-transcribe"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"value": "gpt-4o-mini-transcribe-2025-12-15"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"value": "gpt-4o-transcribe"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"value": "gpt-4o-transcribe-diarize"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"value": "gpt-realtime-whisper"
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"name": "AudioTranscriptionDelay",
|
|
259
|
+
"kind": "enum",
|
|
260
|
+
"base": "string",
|
|
261
|
+
"values": [
|
|
262
|
+
{
|
|
263
|
+
"value": "minimal"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"value": "low"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"value": "medium"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"value": "high"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"value": "xhigh"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"description": "Controls how long the model waits before emitting transcription text.\nHigher values can improve transcription accuracy at the cost of latency.\nOnly supported with `gpt-realtime-whisper` in GA Realtime sessions.\n"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"name": "RealtimeTranscriptionSessionCreateResponse",
|
|
282
|
+
"kind": "struct",
|
|
283
|
+
"fields": [
|
|
284
|
+
{
|
|
285
|
+
"name": "client_secret",
|
|
286
|
+
"type": {
|
|
287
|
+
"kind": "ref",
|
|
288
|
+
"name": "RealtimeTranscriptionSessionCreateResponseClientSecret"
|
|
289
|
+
},
|
|
290
|
+
"required": true,
|
|
291
|
+
"description": "Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.\n"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"name": "modalities",
|
|
295
|
+
"type": {
|
|
296
|
+
"kind": "any"
|
|
297
|
+
},
|
|
298
|
+
"required": false,
|
|
299
|
+
"description": "The set of modalities the model can respond with. To disable audio,\nset this to [\"text\"].\n"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"name": "input_audio_format",
|
|
303
|
+
"type": {
|
|
304
|
+
"kind": "scalar",
|
|
305
|
+
"scalar": "string"
|
|
306
|
+
},
|
|
307
|
+
"required": false,
|
|
308
|
+
"description": "The format of input audio. Options are `pcm16`, `g711_ulaw`, or `g711_alaw`.\n"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"name": "input_audio_transcription",
|
|
312
|
+
"type": {
|
|
313
|
+
"kind": "ref",
|
|
314
|
+
"name": "AudioTranscriptionResponse"
|
|
315
|
+
},
|
|
316
|
+
"required": false
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"name": "turn_detection",
|
|
320
|
+
"type": {
|
|
321
|
+
"kind": "ref",
|
|
322
|
+
"name": "RealtimeTranscriptionSessionCreateResponseTurnDetection"
|
|
323
|
+
},
|
|
324
|
+
"required": false,
|
|
325
|
+
"description": "Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.\n"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
"description": "A new Realtime transcription session configuration.\n\nWhen a session is created on the server via REST API, the session object\nalso contains an ephemeral key. Default TTL for keys is 10 minutes. This\nproperty is not present when a session is updated via the WebSocket API.\n"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"name": "RealtimeTranscriptionSessionCreateResponseClientSecret",
|
|
332
|
+
"kind": "struct",
|
|
333
|
+
"fields": [
|
|
334
|
+
{
|
|
335
|
+
"name": "value",
|
|
336
|
+
"type": {
|
|
337
|
+
"kind": "scalar",
|
|
338
|
+
"scalar": "string"
|
|
339
|
+
},
|
|
340
|
+
"required": true,
|
|
341
|
+
"description": "Ephemeral key usable in client environments to authenticate connections\nto the Realtime API. Use this in client-side environments rather than\na standard API token, which should only be used server-side.\n"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "expires_at",
|
|
345
|
+
"type": {
|
|
346
|
+
"kind": "scalar",
|
|
347
|
+
"scalar": "integer",
|
|
348
|
+
"format": "unixtime"
|
|
349
|
+
},
|
|
350
|
+
"required": true,
|
|
351
|
+
"description": "Timestamp for when the token expires. Currently, all tokens expire\nafter one minute.\n"
|
|
352
|
+
}
|
|
353
|
+
],
|
|
354
|
+
"description": "Ephemeral key returned by the API. Only present when the session is\ncreated on the server via REST API.\n"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"name": "AudioTranscriptionResponse",
|
|
358
|
+
"kind": "struct",
|
|
359
|
+
"fields": [
|
|
360
|
+
{
|
|
361
|
+
"name": "model",
|
|
362
|
+
"type": {
|
|
363
|
+
"kind": "ref",
|
|
364
|
+
"name": "AudioTranscriptionModel"
|
|
365
|
+
},
|
|
366
|
+
"required": false,
|
|
367
|
+
"description": "The model used for transcription. Current options are `whisper-1`, `gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.\n"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"name": "language",
|
|
371
|
+
"type": {
|
|
372
|
+
"kind": "scalar",
|
|
373
|
+
"scalar": "string"
|
|
374
|
+
},
|
|
375
|
+
"required": false,
|
|
376
|
+
"description": "The language of the input audio.\n"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"name": "prompt",
|
|
380
|
+
"type": {
|
|
381
|
+
"kind": "scalar",
|
|
382
|
+
"scalar": "string"
|
|
383
|
+
},
|
|
384
|
+
"required": false,
|
|
385
|
+
"description": "The prompt configured for input audio transcription, when present.\n"
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"name": "RealtimeTranscriptionSessionCreateResponseTurnDetection",
|
|
391
|
+
"kind": "struct",
|
|
392
|
+
"fields": [
|
|
393
|
+
{
|
|
394
|
+
"name": "type",
|
|
395
|
+
"type": {
|
|
396
|
+
"kind": "scalar",
|
|
397
|
+
"scalar": "string"
|
|
398
|
+
},
|
|
399
|
+
"required": false,
|
|
400
|
+
"description": "Type of turn detection, only `server_vad` is currently supported.\n"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"name": "threshold",
|
|
404
|
+
"type": {
|
|
405
|
+
"kind": "scalar",
|
|
406
|
+
"scalar": "number"
|
|
407
|
+
},
|
|
408
|
+
"required": false,
|
|
409
|
+
"description": "Activation threshold for VAD (0.0 to 1.0), this defaults to 0.5. A\nhigher threshold will require louder audio to activate the model, and\nthus might perform better in noisy environments.\n"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"name": "prefix_padding_ms",
|
|
413
|
+
"type": {
|
|
414
|
+
"kind": "scalar",
|
|
415
|
+
"scalar": "integer"
|
|
416
|
+
},
|
|
417
|
+
"required": false,
|
|
418
|
+
"description": "Amount of audio to include before the VAD detected speech (in\nmilliseconds). Defaults to 300ms.\n"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"name": "silence_duration_ms",
|
|
422
|
+
"type": {
|
|
423
|
+
"kind": "scalar",
|
|
424
|
+
"scalar": "integer"
|
|
425
|
+
},
|
|
426
|
+
"required": false,
|
|
427
|
+
"description": "Duration of silence to detect speech stop (in milliseconds). Defaults\nto 500ms. With shorter values the model will respond more quickly,\nbut may jump in on short pauses from the user.\n"
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"description": "Configuration for turn detection. Can be set to `null` to turn off. Server\nVAD means that the model will detect the start and end of speech based on\naudio volume and respond at the end of user speech.\n"
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"resources": [
|
|
434
|
+
{
|
|
435
|
+
"name": "realtime",
|
|
436
|
+
"resources": [
|
|
437
|
+
{
|
|
438
|
+
"name": "transcription-sessions",
|
|
439
|
+
"methods": [
|
|
440
|
+
{
|
|
441
|
+
"action": "create",
|
|
442
|
+
"httpMethod": "post",
|
|
443
|
+
"path": "/realtime/transcription_sessions",
|
|
444
|
+
"operationId": "create-realtime-transcription-session",
|
|
445
|
+
"description": "Create an ephemeral API token for use in client-side applications with the\nRealtime API specifically for realtime transcriptions. \nCan be configured with the same session parameters as the `transcription_session.update` client event.\n\nIt responds with a session object, plus a `client_secret` key which contains\na usable ephemeral API token that can be used to authenticate browser clients\nfor the Realtime API.\n\nReturns the created Realtime transcription session object, plus an ephemeral key.\n",
|
|
446
|
+
"requestBody": {
|
|
447
|
+
"contentType": "application/json",
|
|
448
|
+
"type": {
|
|
449
|
+
"kind": "ref",
|
|
450
|
+
"name": "RealtimeTranscriptionSessionCreateRequest"
|
|
451
|
+
},
|
|
452
|
+
"required": true,
|
|
453
|
+
"encoding": "json",
|
|
454
|
+
"description": "Create an ephemeral API key with the given session configuration."
|
|
455
|
+
},
|
|
456
|
+
"responses": [
|
|
457
|
+
{
|
|
458
|
+
"status": "200",
|
|
459
|
+
"description": "Session created successfully.",
|
|
460
|
+
"contentType": "application/json",
|
|
461
|
+
"type": {
|
|
462
|
+
"kind": "ref",
|
|
463
|
+
"name": "RealtimeTranscriptionSessionCreateResponse"
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
],
|
|
467
|
+
"primaryResponse": {
|
|
468
|
+
"kind": "ref",
|
|
469
|
+
"name": "RealtimeTranscriptionSessionCreateResponse"
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
]
|
|
473
|
+
}
|
|
474
|
+
]
|
|
475
|
+
}
|
|
476
|
+
],
|
|
477
|
+
"sdk": {
|
|
478
|
+
"retry": {
|
|
479
|
+
"maxRetries": 2,
|
|
480
|
+
"retryableStatusCodes": [
|
|
481
|
+
408,
|
|
482
|
+
429,
|
|
483
|
+
500,
|
|
484
|
+
502,
|
|
485
|
+
503,
|
|
486
|
+
504
|
|
487
|
+
],
|
|
488
|
+
"retryConnectionErrors": true,
|
|
489
|
+
"honorRetryAfterHeader": true,
|
|
490
|
+
"backoff": {
|
|
491
|
+
"initialDelayMs": 500,
|
|
492
|
+
"maxDelayMs": 8000,
|
|
493
|
+
"multiplier": 2,
|
|
494
|
+
"jitter": 0.25
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
"timeout": {
|
|
498
|
+
"defaultTimeoutMs": 60000
|
|
499
|
+
},
|
|
500
|
+
"errors": {
|
|
501
|
+
"statusCodeMap": {
|
|
502
|
+
"400": "BadRequest",
|
|
503
|
+
"401": "Unauthorized",
|
|
504
|
+
"403": "PermissionDenied",
|
|
505
|
+
"404": "NotFound",
|
|
506
|
+
"409": "Conflict",
|
|
507
|
+
"422": "UnprocessableEntity",
|
|
508
|
+
"429": "RateLimited"
|
|
509
|
+
},
|
|
510
|
+
"clientErrorKind": "API",
|
|
511
|
+
"serverErrorKind": "Internal"
|
|
512
|
+
},
|
|
513
|
+
"userAgent": {
|
|
514
|
+
"sdkIdentifierTemplate": "{package}-{language}/{version}",
|
|
515
|
+
"includeRuntimeVersion": false,
|
|
516
|
+
"aiAgentEnvVars": {
|
|
517
|
+
"CLAUDE_CODE": "claude-code",
|
|
518
|
+
"CURSOR_AGENT": "cursor",
|
|
519
|
+
"CLINE_ACTIVE": "cline",
|
|
520
|
+
"WINDSURF_ACTIVE": "windsurf",
|
|
521
|
+
"COPILOT_AGENT": "copilot"
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
"telemetry": {
|
|
525
|
+
"requestIdHeader": "X-Request-ID",
|
|
526
|
+
"headerName": "X-Client-Telemetry",
|
|
527
|
+
"enabledByDefault": false
|
|
528
|
+
},
|
|
529
|
+
"logging": {
|
|
530
|
+
"events": [
|
|
531
|
+
"request.start",
|
|
532
|
+
"request.success",
|
|
533
|
+
"request.retry",
|
|
534
|
+
"request.rate_limited",
|
|
535
|
+
"request.error",
|
|
536
|
+
"request.connection_error"
|
|
537
|
+
]
|
|
538
|
+
},
|
|
539
|
+
"idempotency": {
|
|
540
|
+
"headerName": "Idempotency-Key",
|
|
541
|
+
"autoGenerateForPost": true
|
|
542
|
+
},
|
|
543
|
+
"pagination": {
|
|
544
|
+
"autoPageDelayMs": 0
|
|
545
|
+
},
|
|
546
|
+
"requestGuard": {
|
|
547
|
+
"optionKeys": [
|
|
548
|
+
"api_key",
|
|
549
|
+
"apiKey",
|
|
550
|
+
"idempotency_key",
|
|
551
|
+
"idempotencyKey",
|
|
552
|
+
"extra_headers",
|
|
553
|
+
"extraHeaders",
|
|
554
|
+
"max_retries",
|
|
555
|
+
"maxRetries",
|
|
556
|
+
"base_url",
|
|
557
|
+
"baseUrl",
|
|
558
|
+
"timeout"
|
|
559
|
+
]
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Code generated by opensdk. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
from ._transport import Transport, decode
|
|
8
|
+
from .models import * # noqa: F401,F403
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RealtimeResource:
|
|
12
|
+
def __init__(self, transport: Transport) -> None:
|
|
13
|
+
self._transport = transport
|
|
14
|
+
self.transcription_sessions = RealtimeTranscriptionSessionsResource(transport)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class RealtimeTranscriptionSessionsResource:
|
|
18
|
+
def __init__(self, transport: Transport) -> None:
|
|
19
|
+
self._transport = transport
|
|
20
|
+
|
|
21
|
+
def create(self, *, turn_detection: Optional[RealtimeTranscriptionSessionCreateRequestTurnDetection] = None, input_audio_noise_reduction: Optional[RealtimeTranscriptionSessionCreateRequestInputAudioNoiseReduction] = None, input_audio_format: Optional[RealtimeTranscriptionSessionCreateRequestInputAudioFormat] = None, input_audio_transcription: Optional[AudioTranscription] = None, include: Optional[list[str]] = None) -> RealtimeTranscriptionSessionCreateResponse:
|
|
22
|
+
return decode(RealtimeTranscriptionSessionCreateResponse, self._transport.request("POST", "/realtime/transcription_sessions", body={"turn_detection": turn_detection, "input_audio_noise_reduction": input_audio_noise_reduction, "input_audio_format": input_audio_format, "input_audio_transcription": input_audio_transcription, "include": include}))
|