openai 7.20.0 → 7.22.0
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 +24 -0
- package/README.md +4 -2
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +304 -5
- package/client.js.map +1 -1
- package/client.mjs +304 -5
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/admin/organization/admin-api-keys.d.mts.map +1 -1
- package/resources/admin/organization/admin-api-keys.d.ts.map +1 -1
- package/resources/admin/organization/admin-api-keys.js +11 -8
- package/resources/admin/organization/admin-api-keys.js.map +1 -1
- package/resources/admin/organization/admin-api-keys.mjs +11 -8
- package/resources/admin/organization/admin-api-keys.mjs.map +1 -1
- package/resources/admin/organization/audit-logs.d.mts.map +1 -1
- package/resources/admin/organization/audit-logs.d.ts.map +1 -1
- package/resources/admin/organization/audit-logs.js +5 -2
- package/resources/admin/organization/audit-logs.js.map +1 -1
- package/resources/admin/organization/audit-logs.mjs +5 -2
- package/resources/admin/organization/audit-logs.mjs.map +1 -1
- package/resources/admin/organization/certificates.d.mts.map +1 -1
- package/resources/admin/organization/certificates.d.ts.map +1 -1
- package/resources/admin/organization/certificates.js +24 -12
- package/resources/admin/organization/certificates.js.map +1 -1
- package/resources/admin/organization/certificates.mjs +24 -12
- package/resources/admin/organization/certificates.mjs.map +1 -1
- package/resources/admin/organization/data-retention.d.mts.map +1 -1
- package/resources/admin/organization/data-retention.d.ts.map +1 -1
- package/resources/admin/organization/data-retention.js +7 -4
- package/resources/admin/organization/data-retention.js.map +1 -1
- package/resources/admin/organization/data-retention.mjs +7 -4
- package/resources/admin/organization/data-retention.mjs.map +1 -1
- package/resources/admin/organization/external-storage.d.mts +4 -1
- package/resources/admin/organization/external-storage.d.mts.map +1 -1
- package/resources/admin/organization/external-storage.d.ts +4 -1
- package/resources/admin/organization/external-storage.d.ts.map +1 -1
- package/resources/admin/organization/external-storage.js +20 -10
- package/resources/admin/organization/external-storage.js.map +1 -1
- package/resources/admin/organization/external-storage.mjs +20 -10
- package/resources/admin/organization/external-storage.mjs.map +1 -1
- package/resources/admin/organization/groups/groups.d.mts.map +1 -1
- package/resources/admin/organization/groups/groups.d.ts.map +1 -1
- package/resources/admin/organization/groups/groups.js +13 -10
- package/resources/admin/organization/groups/groups.js.map +1 -1
- package/resources/admin/organization/groups/groups.mjs +13 -10
- package/resources/admin/organization/groups/groups.mjs.map +1 -1
- package/resources/admin/organization/groups/roles.d.mts.map +1 -1
- package/resources/admin/organization/groups/roles.d.ts.map +1 -1
- package/resources/admin/organization/groups/roles.js +14 -7
- package/resources/admin/organization/groups/roles.js.map +1 -1
- package/resources/admin/organization/groups/roles.mjs +14 -7
- package/resources/admin/organization/groups/roles.mjs.map +1 -1
- package/resources/admin/organization/groups/users.d.mts.map +1 -1
- package/resources/admin/organization/groups/users.d.ts.map +1 -1
- package/resources/admin/organization/groups/users.js +14 -7
- package/resources/admin/organization/groups/users.js.map +1 -1
- package/resources/admin/organization/groups/users.mjs +14 -7
- package/resources/admin/organization/groups/users.mjs.map +1 -1
- package/resources/admin/organization/invites.d.mts.map +1 -1
- package/resources/admin/organization/invites.d.ts.map +1 -1
- package/resources/admin/organization/invites.js +11 -8
- package/resources/admin/organization/invites.js.map +1 -1
- package/resources/admin/organization/invites.mjs +11 -8
- package/resources/admin/organization/invites.mjs.map +1 -1
- package/resources/admin/organization/organization.d.mts +2 -2
- package/resources/admin/organization/organization.d.mts.map +1 -1
- package/resources/admin/organization/organization.d.ts +2 -2
- package/resources/admin/organization/organization.d.ts.map +1 -1
- package/resources/admin/organization/organization.js +2 -2
- package/resources/admin/organization/organization.js.map +1 -1
- package/resources/admin/organization/organization.mjs +2 -2
- package/resources/admin/organization/organization.mjs.map +1 -1
- package/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/projects/api-keys.js +12 -5
- package/resources/admin/organization/projects/api-keys.js.map +1 -1
- package/resources/admin/organization/projects/api-keys.mjs +12 -5
- package/resources/admin/organization/projects/api-keys.mjs.map +1 -1
- package/resources/admin/organization/projects/certificates.d.mts.map +1 -1
- package/resources/admin/organization/projects/certificates.d.ts.map +1 -1
- package/resources/admin/organization/projects/certificates.js +20 -3
- package/resources/admin/organization/projects/certificates.js.map +1 -1
- package/resources/admin/organization/projects/certificates.mjs +20 -3
- package/resources/admin/organization/projects/certificates.mjs.map +1 -1
- package/resources/admin/organization/projects/data-retention.d.mts.map +1 -1
- package/resources/admin/organization/projects/data-retention.d.ts.map +1 -1
- package/resources/admin/organization/projects/data-retention.js +7 -4
- package/resources/admin/organization/projects/data-retention.js.map +1 -1
- package/resources/admin/organization/projects/data-retention.mjs +7 -4
- package/resources/admin/organization/projects/data-retention.mjs.map +1 -1
- package/resources/admin/organization/projects/groups/groups.d.mts.map +1 -1
- package/resources/admin/organization/projects/groups/groups.d.ts.map +1 -1
- package/resources/admin/organization/projects/groups/groups.js +14 -7
- package/resources/admin/organization/projects/groups/groups.js.map +1 -1
- package/resources/admin/organization/projects/groups/groups.mjs +14 -7
- package/resources/admin/organization/projects/groups/groups.mjs.map +1 -1
- package/resources/admin/organization/projects/groups/roles.d.mts.map +1 -1
- package/resources/admin/organization/projects/groups/roles.d.ts.map +1 -1
- package/resources/admin/organization/projects/groups/roles.js +14 -7
- package/resources/admin/organization/projects/groups/roles.js.map +1 -1
- package/resources/admin/organization/projects/groups/roles.mjs +14 -7
- package/resources/admin/organization/projects/groups/roles.mjs.map +1 -1
- package/resources/admin/organization/projects/hosted-tool-permissions.d.mts.map +1 -1
- package/resources/admin/organization/projects/hosted-tool-permissions.d.ts.map +1 -1
- package/resources/admin/organization/projects/hosted-tool-permissions.js +7 -4
- package/resources/admin/organization/projects/hosted-tool-permissions.js.map +1 -1
- package/resources/admin/organization/projects/hosted-tool-permissions.mjs +7 -4
- package/resources/admin/organization/projects/hosted-tool-permissions.mjs.map +1 -1
- package/resources/admin/organization/projects/model-permissions.d.mts.map +1 -1
- package/resources/admin/organization/projects/model-permissions.d.ts.map +1 -1
- package/resources/admin/organization/projects/model-permissions.js +9 -6
- package/resources/admin/organization/projects/model-permissions.js.map +1 -1
- package/resources/admin/organization/projects/model-permissions.mjs +9 -6
- package/resources/admin/organization/projects/model-permissions.mjs.map +1 -1
- package/resources/admin/organization/projects/projects.d.mts.map +1 -1
- package/resources/admin/organization/projects/projects.d.ts.map +1 -1
- package/resources/admin/organization/projects/projects.js +13 -10
- package/resources/admin/organization/projects/projects.js.map +1 -1
- package/resources/admin/organization/projects/projects.mjs +13 -10
- package/resources/admin/organization/projects/projects.mjs.map +1 -1
- package/resources/admin/organization/projects/rate-limits.d.mts.map +1 -1
- package/resources/admin/organization/projects/rate-limits.d.ts.map +1 -1
- package/resources/admin/organization/projects/rate-limits.js +10 -3
- package/resources/admin/organization/projects/rate-limits.js.map +1 -1
- package/resources/admin/organization/projects/rate-limits.mjs +10 -3
- package/resources/admin/organization/projects/rate-limits.mjs.map +1 -1
- package/resources/admin/organization/projects/roles.d.mts.map +1 -1
- package/resources/admin/organization/projects/roles.d.ts.map +1 -1
- package/resources/admin/organization/projects/roles.js +13 -10
- package/resources/admin/organization/projects/roles.js.map +1 -1
- package/resources/admin/organization/projects/roles.mjs +13 -10
- package/resources/admin/organization/projects/roles.mjs.map +1 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.js +8 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.js.map +1 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.mjs +8 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.mjs.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.js +21 -7
- package/resources/admin/organization/projects/service-accounts/service-accounts.js.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.mjs +21 -7
- package/resources/admin/organization/projects/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/admin/organization/projects/spend-alerts.d.mts.map +1 -1
- package/resources/admin/organization/projects/spend-alerts.d.ts.map +1 -1
- package/resources/admin/organization/projects/spend-alerts.js +16 -9
- package/resources/admin/organization/projects/spend-alerts.js.map +1 -1
- package/resources/admin/organization/projects/spend-alerts.mjs +16 -9
- package/resources/admin/organization/projects/spend-alerts.mjs.map +1 -1
- package/resources/admin/organization/projects/spend-limit.d.mts.map +1 -1
- package/resources/admin/organization/projects/spend-limit.d.ts.map +1 -1
- package/resources/admin/organization/projects/spend-limit.js +9 -6
- package/resources/admin/organization/projects/spend-limit.js.map +1 -1
- package/resources/admin/organization/projects/spend-limit.mjs +9 -6
- package/resources/admin/organization/projects/spend-limit.mjs.map +1 -1
- package/resources/admin/organization/projects/users/roles.d.mts.map +1 -1
- package/resources/admin/organization/projects/users/roles.d.ts.map +1 -1
- package/resources/admin/organization/projects/users/roles.js +14 -7
- package/resources/admin/organization/projects/users/roles.js.map +1 -1
- package/resources/admin/organization/projects/users/roles.mjs +14 -7
- package/resources/admin/organization/projects/users/roles.mjs.map +1 -1
- package/resources/admin/organization/projects/users/users.d.mts.map +1 -1
- package/resources/admin/organization/projects/users/users.d.ts.map +1 -1
- package/resources/admin/organization/projects/users/users.js +16 -9
- package/resources/admin/organization/projects/users/users.js.map +1 -1
- package/resources/admin/organization/projects/users/users.mjs +16 -9
- package/resources/admin/organization/projects/users/users.mjs.map +1 -1
- package/resources/admin/organization/roles.d.mts.map +1 -1
- package/resources/admin/organization/roles.d.ts.map +1 -1
- package/resources/admin/organization/roles.js +13 -10
- package/resources/admin/organization/roles.js.map +1 -1
- package/resources/admin/organization/roles.mjs +13 -10
- package/resources/admin/organization/roles.mjs.map +1 -1
- package/resources/admin/organization/spend-alerts.d.mts.map +1 -1
- package/resources/admin/organization/spend-alerts.d.ts.map +1 -1
- package/resources/admin/organization/spend-alerts.js +16 -9
- package/resources/admin/organization/spend-alerts.js.map +1 -1
- package/resources/admin/organization/spend-alerts.mjs +16 -9
- package/resources/admin/organization/spend-alerts.mjs.map +1 -1
- package/resources/admin/organization/spend-limit.d.mts.map +1 -1
- package/resources/admin/organization/spend-limit.d.ts.map +1 -1
- package/resources/admin/organization/spend-limit.js +9 -6
- package/resources/admin/organization/spend-limit.js.map +1 -1
- package/resources/admin/organization/spend-limit.mjs +9 -6
- package/resources/admin/organization/spend-limit.mjs.map +1 -1
- package/resources/admin/organization/usage.d.mts.map +1 -1
- package/resources/admin/organization/usage.d.ts.map +1 -1
- package/resources/admin/organization/usage.js +25 -22
- package/resources/admin/organization/usage.js.map +1 -1
- package/resources/admin/organization/usage.mjs +25 -22
- package/resources/admin/organization/usage.mjs.map +1 -1
- package/resources/admin/organization/users/roles.d.mts.map +1 -1
- package/resources/admin/organization/users/roles.d.ts.map +1 -1
- package/resources/admin/organization/users/roles.js +14 -7
- package/resources/admin/organization/users/roles.js.map +1 -1
- package/resources/admin/organization/users/roles.mjs +14 -7
- package/resources/admin/organization/users/roles.mjs.map +1 -1
- package/resources/admin/organization/users/users.d.mts.map +1 -1
- package/resources/admin/organization/users/users.d.ts.map +1 -1
- package/resources/admin/organization/users/users.js +11 -8
- package/resources/admin/organization/users/users.js.map +1 -1
- package/resources/admin/organization/users/users.mjs +11 -8
- package/resources/admin/organization/users/users.mjs.map +1 -1
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/speech.js +5 -2
- package/resources/audio/speech.js.map +1 -1
- package/resources/audio/speech.mjs +5 -2
- package/resources/audio/speech.mjs.map +1 -1
- package/resources/audio/transcriptions.d.mts.map +1 -1
- package/resources/audio/transcriptions.d.ts.map +1 -1
- package/resources/audio/transcriptions.js +5 -2
- package/resources/audio/transcriptions.js.map +1 -1
- package/resources/audio/transcriptions.mjs +5 -2
- package/resources/audio/transcriptions.mjs.map +1 -1
- package/resources/audio/translations.d.mts.map +1 -1
- package/resources/audio/translations.d.ts.map +1 -1
- package/resources/audio/translations.js +4 -1
- package/resources/audio/translations.js.map +1 -1
- package/resources/audio/translations.mjs +4 -1
- package/resources/audio/translations.mjs.map +1 -1
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts.map +1 -1
- package/resources/batches.js +12 -8
- package/resources/batches.js.map +1 -1
- package/resources/batches.mjs +12 -8
- package/resources/batches.mjs.map +1 -1
- package/resources/beta/agents/agents.d.mts +32 -2
- package/resources/beta/agents/agents.d.mts.map +1 -1
- package/resources/beta/agents/agents.d.ts +32 -2
- package/resources/beta/agents/agents.d.ts.map +1 -1
- package/resources/beta/agents/agents.js +13 -10
- package/resources/beta/agents/agents.js.map +1 -1
- package/resources/beta/agents/agents.mjs +13 -10
- package/resources/beta/agents/agents.mjs.map +1 -1
- package/resources/beta/agents/environments/environments.d.mts.map +1 -1
- package/resources/beta/agents/environments/environments.d.ts.map +1 -1
- package/resources/beta/agents/environments/environments.js +5 -2
- package/resources/beta/agents/environments/environments.js.map +1 -1
- package/resources/beta/agents/environments/environments.mjs +5 -2
- package/resources/beta/agents/environments/environments.mjs.map +1 -1
- package/resources/beta/agents/environments/files.d.mts.map +1 -1
- package/resources/beta/agents/environments/files.d.ts.map +1 -1
- package/resources/beta/agents/environments/files.js +7 -4
- package/resources/beta/agents/environments/files.js.map +1 -1
- package/resources/beta/agents/environments/files.mjs +7 -4
- package/resources/beta/agents/environments/files.mjs.map +1 -1
- package/resources/beta/agents/environments/templates.d.mts.map +1 -1
- package/resources/beta/agents/environments/templates.d.ts.map +1 -1
- package/resources/beta/agents/environments/templates.js +13 -10
- package/resources/beta/agents/environments/templates.js.map +1 -1
- package/resources/beta/agents/environments/templates.mjs +13 -10
- package/resources/beta/agents/environments/templates.mjs.map +1 -1
- package/resources/beta/agents/index.d.mts +1 -1
- package/resources/beta/agents/index.d.mts.map +1 -1
- package/resources/beta/agents/index.d.ts +1 -1
- package/resources/beta/agents/index.d.ts.map +1 -1
- package/resources/beta/agents/index.js.map +1 -1
- package/resources/beta/agents/index.mjs.map +1 -1
- package/resources/beta/agents/sessions/artifacts.d.mts.map +1 -1
- package/resources/beta/agents/sessions/artifacts.d.ts.map +1 -1
- package/resources/beta/agents/sessions/artifacts.js +11 -8
- package/resources/beta/agents/sessions/artifacts.js.map +1 -1
- package/resources/beta/agents/sessions/artifacts.mjs +11 -8
- package/resources/beta/agents/sessions/artifacts.mjs.map +1 -1
- package/resources/beta/agents/sessions/events.d.mts.map +1 -1
- package/resources/beta/agents/sessions/events.d.ts.map +1 -1
- package/resources/beta/agents/sessions/events.js +11 -5
- package/resources/beta/agents/sessions/events.js.map +1 -1
- package/resources/beta/agents/sessions/events.mjs +11 -5
- package/resources/beta/agents/sessions/events.mjs.map +1 -1
- package/resources/beta/agents/sessions/items.d.mts.map +1 -1
- package/resources/beta/agents/sessions/items.d.ts.map +1 -1
- package/resources/beta/agents/sessions/items.js +5 -2
- package/resources/beta/agents/sessions/items.js.map +1 -1
- package/resources/beta/agents/sessions/items.mjs +5 -2
- package/resources/beta/agents/sessions/items.mjs.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.mts.map +1 -1
- package/resources/beta/agents/sessions/sessions.d.ts.map +1 -1
- package/resources/beta/agents/sessions/sessions.js +13 -10
- package/resources/beta/agents/sessions/sessions.js.map +1 -1
- package/resources/beta/agents/sessions/sessions.mjs +13 -10
- package/resources/beta/agents/sessions/sessions.mjs.map +1 -1
- package/resources/beta/agents/sessions/subagents/items.d.mts.map +1 -1
- package/resources/beta/agents/sessions/subagents/items.d.ts.map +1 -1
- package/resources/beta/agents/sessions/subagents/items.js +5 -2
- package/resources/beta/agents/sessions/subagents/items.js.map +1 -1
- package/resources/beta/agents/sessions/subagents/items.mjs +5 -2
- package/resources/beta/agents/sessions/subagents/items.mjs.map +1 -1
- package/resources/beta/agents/sessions/subagents/subagents.d.mts.map +1 -1
- package/resources/beta/agents/sessions/subagents/subagents.d.ts.map +1 -1
- package/resources/beta/agents/sessions/subagents/subagents.js +7 -4
- package/resources/beta/agents/sessions/subagents/subagents.js.map +1 -1
- package/resources/beta/agents/sessions/subagents/subagents.mjs +7 -4
- package/resources/beta/agents/sessions/subagents/subagents.mjs.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/items.d.mts.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/items.d.ts.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/items.js +5 -2
- package/resources/beta/agents/sessions/subagents/turns/items.js.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/items.mjs +5 -2
- package/resources/beta/agents/sessions/subagents/turns/items.mjs.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/turns.d.mts.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/turns.d.ts.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/turns.js +7 -4
- package/resources/beta/agents/sessions/subagents/turns/turns.js.map +1 -1
- package/resources/beta/agents/sessions/subagents/turns/turns.mjs +7 -4
- package/resources/beta/agents/sessions/subagents/turns/turns.mjs.map +1 -1
- package/resources/beta/agents/sessions/turns.d.mts.map +1 -1
- package/resources/beta/agents/sessions/turns.d.ts.map +1 -1
- package/resources/beta/agents/sessions/turns.js +7 -4
- package/resources/beta/agents/sessions/turns.js.map +1 -1
- package/resources/beta/agents/sessions/turns.mjs +7 -4
- package/resources/beta/agents/sessions/turns.mjs.map +1 -1
- package/resources/beta/agents/vaults/credentials.d.mts.map +1 -1
- package/resources/beta/agents/vaults/credentials.d.ts.map +1 -1
- package/resources/beta/agents/vaults/credentials.js +13 -10
- package/resources/beta/agents/vaults/credentials.js.map +1 -1
- package/resources/beta/agents/vaults/credentials.mjs +13 -10
- package/resources/beta/agents/vaults/credentials.mjs.map +1 -1
- package/resources/beta/agents/vaults/vaults.d.mts.map +1 -1
- package/resources/beta/agents/vaults/vaults.d.ts.map +1 -1
- package/resources/beta/agents/vaults/vaults.js +11 -8
- package/resources/beta/agents/vaults/vaults.js.map +1 -1
- package/resources/beta/agents/vaults/vaults.mjs +11 -8
- package/resources/beta/agents/vaults/vaults.mjs.map +1 -1
- package/resources/beta/assistants.d.mts.map +1 -1
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/assistants.js +13 -10
- package/resources/beta/assistants.js.map +1 -1
- package/resources/beta/assistants.mjs +13 -10
- package/resources/beta/assistants.mjs.map +1 -1
- package/resources/beta/beta.d.mts +2 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/chatkit/sessions.d.mts.map +1 -1
- package/resources/beta/chatkit/sessions.d.ts.map +1 -1
- package/resources/beta/chatkit/sessions.js +7 -4
- package/resources/beta/chatkit/sessions.js.map +1 -1
- package/resources/beta/chatkit/sessions.mjs +7 -4
- package/resources/beta/chatkit/sessions.mjs.map +1 -1
- package/resources/beta/chatkit/threads.d.mts.map +1 -1
- package/resources/beta/chatkit/threads.d.ts.map +1 -1
- package/resources/beta/chatkit/threads.js +11 -8
- package/resources/beta/chatkit/threads.js.map +1 -1
- package/resources/beta/chatkit/threads.mjs +11 -8
- package/resources/beta/chatkit/threads.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/responses/input-items.d.mts +11 -1
- package/resources/beta/responses/input-items.d.mts.map +1 -1
- package/resources/beta/responses/input-items.d.ts +11 -1
- package/resources/beta/responses/input-items.d.ts.map +1 -1
- package/resources/beta/responses/input-items.js +66 -15
- package/resources/beta/responses/input-items.js.map +1 -1
- package/resources/beta/responses/input-items.mjs +66 -15
- package/resources/beta/responses/input-items.mjs.map +1 -1
- package/resources/beta/responses/input-tokens.d.mts +3 -0
- package/resources/beta/responses/input-tokens.d.mts.map +1 -1
- package/resources/beta/responses/input-tokens.d.ts +3 -0
- package/resources/beta/responses/input-tokens.d.ts.map +1 -1
- package/resources/beta/responses/input-tokens.js +8 -2
- package/resources/beta/responses/input-tokens.js.map +1 -1
- package/resources/beta/responses/input-tokens.mjs +8 -2
- package/resources/beta/responses/input-tokens.mjs.map +1 -1
- package/resources/beta/responses/responses.d.mts +21 -7
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +21 -7
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js +78 -11
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs +78 -11
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/beta/threads/messages.d.mts.map +1 -1
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/messages.js +13 -10
- package/resources/beta/threads/messages.js.map +1 -1
- package/resources/beta/threads/messages.mjs +13 -10
- package/resources/beta/threads/messages.mjs.map +1 -1
- package/resources/beta/threads/runs/runs.d.mts.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js +15 -12
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs +15 -12
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.mts.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/runs/steps.js +7 -4
- package/resources/beta/threads/runs/steps.js.map +1 -1
- package/resources/beta/threads/runs/steps.mjs +7 -4
- package/resources/beta/threads/runs/steps.mjs.map +1 -1
- package/resources/beta/threads/threads.d.mts.map +1 -1
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js +13 -10
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs +13 -10
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js +11 -14
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs +11 -14
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/chat/completions/messages.d.mts.map +1 -1
- package/resources/chat/completions/messages.d.ts.map +1 -1
- package/resources/chat/completions/messages.js +8 -1
- package/resources/chat/completions/messages.js.map +1 -1
- package/resources/chat/completions/messages.mjs +8 -1
- package/resources/chat/completions/messages.mjs.map +1 -1
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts.map +1 -1
- package/resources/completions.js +5 -2
- package/resources/completions.js.map +1 -1
- package/resources/completions.mjs +5 -2
- package/resources/completions.mjs.map +1 -1
- package/resources/containers/containers.d.mts.map +1 -1
- package/resources/containers/containers.d.ts.map +1 -1
- package/resources/containers/containers.js +13 -9
- package/resources/containers/containers.js.map +1 -1
- package/resources/containers/containers.mjs +13 -9
- package/resources/containers/containers.mjs.map +1 -1
- package/resources/containers/files/content.d.mts.map +1 -1
- package/resources/containers/files/content.d.ts.map +1 -1
- package/resources/containers/files/content.js +5 -2
- package/resources/containers/files/content.js.map +1 -1
- package/resources/containers/files/content.mjs +5 -2
- package/resources/containers/files/content.mjs.map +1 -1
- package/resources/containers/files/files.d.mts.map +1 -1
- package/resources/containers/files/files.d.ts.map +1 -1
- package/resources/containers/files/files.js +9 -9
- package/resources/containers/files/files.js.map +1 -1
- package/resources/containers/files/files.mjs +9 -9
- package/resources/containers/files/files.mjs.map +1 -1
- package/resources/content-provenance-checks.d.mts.map +1 -1
- package/resources/content-provenance-checks.d.ts.map +1 -1
- package/resources/content-provenance-checks.js +4 -1
- package/resources/content-provenance-checks.js.map +1 -1
- package/resources/content-provenance-checks.mjs +4 -1
- package/resources/content-provenance-checks.mjs.map +1 -1
- package/resources/conversations/conversations.d.mts.map +1 -1
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js +12 -11
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs +12 -11
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/items.d.mts.map +1 -1
- package/resources/conversations/items.d.ts.map +1 -1
- package/resources/conversations/items.js +13 -9
- package/resources/conversations/items.js.map +1 -1
- package/resources/conversations/items.mjs +13 -9
- package/resources/conversations/items.mjs.map +1 -1
- package/resources/evals/evals.d.mts.map +1 -1
- package/resources/evals/evals.d.ts.map +1 -1
- package/resources/evals/evals.js +17 -6
- package/resources/evals/evals.js.map +1 -1
- package/resources/evals/evals.mjs +17 -6
- package/resources/evals/evals.mjs.map +1 -1
- package/resources/evals/runs/output-items.d.mts.map +1 -1
- package/resources/evals/runs/output-items.d.ts.map +1 -1
- package/resources/evals/runs/output-items.js +9 -5
- package/resources/evals/runs/output-items.js.map +1 -1
- package/resources/evals/runs/output-items.mjs +9 -5
- package/resources/evals/runs/output-items.mjs.map +1 -1
- package/resources/evals/runs/runs.d.mts.map +1 -1
- package/resources/evals/runs/runs.d.ts.map +1 -1
- package/resources/evals/runs/runs.js +10 -16
- package/resources/evals/runs/runs.js.map +1 -1
- package/resources/evals/runs/runs.mjs +10 -16
- package/resources/evals/runs/runs.mjs.map +1 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +10 -7
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +10 -7
- package/resources/files.mjs.map +1 -1
- package/resources/fine-tuning/alpha/graders.d.mts.map +1 -1
- package/resources/fine-tuning/alpha/graders.d.ts.map +1 -1
- package/resources/fine-tuning/alpha/graders.js +7 -4
- package/resources/fine-tuning/alpha/graders.js.map +1 -1
- package/resources/fine-tuning/alpha/graders.mjs +7 -4
- package/resources/fine-tuning/alpha/graders.mjs.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.mts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.js +20 -5
- package/resources/fine-tuning/checkpoints/permissions.js.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.mjs +20 -5
- package/resources/fine-tuning/checkpoints/permissions.mjs.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.js +8 -1
- package/resources/fine-tuning/jobs/checkpoints.js.map +1 -1
- package/resources/fine-tuning/jobs/checkpoints.mjs +8 -1
- package/resources/fine-tuning/jobs/checkpoints.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js +19 -20
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs +19 -20
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/images.d.mts.map +1 -1
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js +8 -5
- package/resources/images.js.map +1 -1
- package/resources/images.mjs +8 -5
- package/resources/images.mjs.map +1 -1
- package/resources/live/live.d.mts.map +1 -1
- package/resources/live/live.d.ts.map +1 -1
- package/resources/live/live.js +8 -1
- package/resources/live/live.js.map +1 -1
- package/resources/live/live.mjs +8 -1
- package/resources/live/live.mjs.map +1 -1
- package/resources/live/sessions.d.mts.map +1 -1
- package/resources/live/sessions.d.ts.map +1 -1
- package/resources/live/sessions.js +15 -12
- package/resources/live/sessions.js.map +1 -1
- package/resources/live/sessions.mjs +15 -12
- package/resources/live/sessions.mjs.map +1 -1
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +6 -3
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +6 -3
- package/resources/models.mjs.map +1 -1
- package/resources/moderations.d.mts.map +1 -1
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +8 -1
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +8 -1
- package/resources/moderations.mjs.map +1 -1
- package/resources/realtime/calls.d.mts.map +1 -1
- package/resources/realtime/calls.d.ts.map +1 -1
- package/resources/realtime/calls.js +13 -10
- package/resources/realtime/calls.js.map +1 -1
- package/resources/realtime/calls.mjs +13 -10
- package/resources/realtime/calls.mjs.map +1 -1
- package/resources/realtime/client-secrets.d.mts.map +1 -1
- package/resources/realtime/client-secrets.d.ts.map +1 -1
- package/resources/realtime/client-secrets.js +5 -2
- package/resources/realtime/client-secrets.js.map +1 -1
- package/resources/realtime/client-secrets.mjs +5 -2
- package/resources/realtime/client-secrets.mjs.map +1 -1
- package/resources/responses/input-items.d.mts +3 -0
- package/resources/responses/input-items.d.mts.map +1 -1
- package/resources/responses/input-items.d.ts +3 -0
- package/resources/responses/input-items.d.ts.map +1 -1
- package/resources/responses/input-items.js +11 -1
- package/resources/responses/input-items.js.map +1 -1
- package/resources/responses/input-items.mjs +11 -1
- package/resources/responses/input-items.mjs.map +1 -1
- package/resources/responses/input-tokens.d.mts +3 -0
- package/resources/responses/input-tokens.d.mts.map +1 -1
- package/resources/responses/input-tokens.d.ts +3 -0
- package/resources/responses/input-tokens.d.ts.map +1 -1
- package/resources/responses/input-tokens.js +8 -2
- package/resources/responses/input-tokens.js.map +1 -1
- package/resources/responses/input-tokens.mjs +8 -2
- package/resources/responses/input-tokens.mjs.map +1 -1
- package/resources/responses/responses.d.mts +4 -1
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +4 -1
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +18 -11
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +18 -11
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/safety/alerts.d.mts.map +1 -1
- package/resources/safety/alerts.d.ts.map +1 -1
- package/resources/safety/alerts.js +4 -1
- package/resources/safety/alerts.js.map +1 -1
- package/resources/safety/alerts.mjs +4 -1
- package/resources/safety/alerts.mjs.map +1 -1
- package/resources/safety/cases.d.mts.map +1 -1
- package/resources/safety/cases.d.ts.map +1 -1
- package/resources/safety/cases.js +4 -1
- package/resources/safety/cases.js.map +1 -1
- package/resources/safety/cases.mjs +4 -1
- package/resources/safety/cases.mjs.map +1 -1
- package/resources/safety/safety.d.mts +2 -2
- package/resources/safety/safety.d.mts.map +1 -1
- package/resources/safety/safety.d.ts +2 -2
- package/resources/safety/safety.d.ts.map +1 -1
- package/resources/safety/safety.js +2 -2
- package/resources/safety/safety.js.map +1 -1
- package/resources/safety/safety.mjs +2 -2
- package/resources/safety/safety.mjs.map +1 -1
- package/resources/shared.d.mts +1 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +1 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/skills/content.d.mts.map +1 -1
- package/resources/skills/content.d.ts.map +1 -1
- package/resources/skills/content.js +5 -2
- package/resources/skills/content.js.map +1 -1
- package/resources/skills/content.mjs +5 -2
- package/resources/skills/content.mjs.map +1 -1
- package/resources/skills/skills.d.mts.map +1 -1
- package/resources/skills/skills.d.ts.map +1 -1
- package/resources/skills/skills.js +9 -6
- package/resources/skills/skills.js.map +1 -1
- package/resources/skills/skills.mjs +9 -6
- package/resources/skills/skills.mjs.map +1 -1
- package/resources/skills/versions/content.d.mts.map +1 -1
- package/resources/skills/versions/content.d.ts.map +1 -1
- package/resources/skills/versions/content.js +5 -2
- package/resources/skills/versions/content.js.map +1 -1
- package/resources/skills/versions/content.mjs +5 -2
- package/resources/skills/versions/content.mjs.map +1 -1
- package/resources/skills/versions/versions.d.mts.map +1 -1
- package/resources/skills/versions/versions.d.ts.map +1 -1
- package/resources/skills/versions/versions.js +7 -10
- package/resources/skills/versions/versions.js.map +1 -1
- package/resources/skills/versions/versions.mjs +7 -10
- package/resources/skills/versions/versions.mjs.map +1 -1
- package/resources/uploads/parts.d.mts.map +1 -1
- package/resources/uploads/parts.d.ts.map +1 -1
- package/resources/uploads/parts.js +4 -1
- package/resources/uploads/parts.js.map +1 -1
- package/resources/uploads/parts.mjs +4 -1
- package/resources/uploads/parts.mjs.map +1 -1
- package/resources/uploads/uploads.d.mts.map +1 -1
- package/resources/uploads/uploads.d.ts.map +1 -1
- package/resources/uploads/uploads.js +11 -7
- package/resources/uploads/uploads.js.map +1 -1
- package/resources/uploads/uploads.mjs +11 -7
- package/resources/uploads/uploads.mjs.map +1 -1
- package/resources/vector-stores/file-batches.d.mts.map +1 -1
- package/resources/vector-stores/file-batches.d.ts.map +1 -1
- package/resources/vector-stores/file-batches.js +11 -8
- package/resources/vector-stores/file-batches.js.map +1 -1
- package/resources/vector-stores/file-batches.mjs +11 -8
- package/resources/vector-stores/file-batches.mjs.map +1 -1
- package/resources/vector-stores/files.d.mts.map +1 -1
- package/resources/vector-stores/files.d.ts.map +1 -1
- package/resources/vector-stores/files.js +15 -12
- package/resources/vector-stores/files.js.map +1 -1
- package/resources/vector-stores/files.mjs +15 -12
- package/resources/vector-stores/files.mjs.map +1 -1
- package/resources/vector-stores/vector-stores.d.mts.map +1 -1
- package/resources/vector-stores/vector-stores.d.ts.map +1 -1
- package/resources/vector-stores/vector-stores.js +15 -12
- package/resources/vector-stores/vector-stores.js.map +1 -1
- package/resources/vector-stores/vector-stores.mjs +15 -12
- package/resources/vector-stores/vector-stores.mjs.map +1 -1
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts.map +1 -1
- package/resources/videos.js +15 -15
- package/resources/videos.js.map +1 -1
- package/resources/videos.mjs +15 -15
- package/resources/videos.mjs.map +1 -1
- package/resources/webhooks/event-types.d.mts.map +1 -1
- package/resources/webhooks/event-types.d.ts.map +1 -1
- package/resources/webhooks/event-types.js +4 -1
- package/resources/webhooks/event-types.js.map +1 -1
- package/resources/webhooks/event-types.mjs +4 -1
- package/resources/webhooks/event-types.mjs.map +1 -1
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/resources/webhooks/webhooks.js +18 -17
- package/resources/webhooks/webhooks.js.map +1 -1
- package/resources/webhooks/webhooks.mjs +18 -17
- package/resources/webhooks/webhooks.mjs.map +1 -1
- package/src/client.ts +345 -4
- package/src/resources/admin/organization/admin-api-keys.ts +38 -18
- package/src/resources/admin/organization/audit-logs.ts +16 -5
- package/src/resources/admin/organization/certificates.ts +59 -27
- package/src/resources/admin/organization/data-retention.ts +22 -9
- package/src/resources/admin/organization/external-storage.ts +45 -19
- package/src/resources/admin/organization/groups/groups.ts +46 -23
- package/src/resources/admin/organization/groups/roles.ts +34 -14
- package/src/resources/admin/organization/groups/users.ts +34 -14
- package/src/resources/admin/organization/invites.ts +38 -18
- package/src/resources/admin/organization/organization.ts +13 -13
- package/src/resources/admin/organization/projects/api-keys.ts +26 -9
- package/src/resources/admin/organization/projects/certificates.ts +24 -3
- package/src/resources/admin/organization/projects/data-retention.ts +22 -9
- package/src/resources/admin/organization/projects/groups/groups.ts +35 -15
- package/src/resources/admin/organization/projects/groups/roles.ts +34 -14
- package/src/resources/admin/organization/projects/hosted-tool-permissions.ts +22 -9
- package/src/resources/admin/organization/projects/model-permissions.ts +29 -13
- package/src/resources/admin/organization/projects/projects.ts +46 -23
- package/src/resources/admin/organization/projects/rate-limits.ts +20 -6
- package/src/resources/admin/organization/projects/roles.ts +46 -23
- package/src/resources/admin/organization/projects/service-accounts/api-keys.ts +12 -1
- package/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +36 -12
- package/src/resources/admin/organization/projects/spend-alerts.ts +42 -19
- package/src/resources/admin/organization/projects/spend-limit.ts +29 -13
- package/src/resources/admin/organization/projects/users/roles.ts +34 -14
- package/src/resources/admin/organization/projects/users/users.ts +42 -19
- package/src/resources/admin/organization/roles.ts +46 -23
- package/src/resources/admin/organization/spend-alerts.ts +42 -19
- package/src/resources/admin/organization/spend-limit.ts +29 -13
- package/src/resources/admin/organization/usage.ts +95 -55
- package/src/resources/admin/organization/users/roles.ts +34 -14
- package/src/resources/admin/organization/users/users.ts +38 -18
- package/src/resources/audio/speech.ts +17 -7
- package/src/resources/audio/transcriptions.ts +18 -9
- package/src/resources/audio/translations.ts +12 -3
- package/src/resources/batches.ts +32 -11
- package/src/resources/beta/agents/agents.ts +89 -28
- package/src/resources/beta/agents/environments/environments.ts +15 -5
- package/src/resources/beta/agents/environments/files.ts +18 -8
- package/src/resources/beta/agents/environments/templates.ts +51 -28
- package/src/resources/beta/agents/index.ts +1 -0
- package/src/resources/beta/agents/sessions/artifacts.ts +37 -21
- package/src/resources/beta/agents/sessions/events.ts +35 -19
- package/src/resources/beta/agents/sessions/items.ts +9 -2
- package/src/resources/beta/agents/sessions/sessions.ts +52 -29
- package/src/resources/beta/agents/sessions/subagents/items.ts +9 -2
- package/src/resources/beta/agents/sessions/subagents/subagents.ts +17 -7
- package/src/resources/beta/agents/sessions/subagents/turns/items.ts +9 -2
- package/src/resources/beta/agents/sessions/subagents/turns/turns.ts +17 -7
- package/src/resources/beta/agents/sessions/turns.ts +25 -11
- package/src/resources/beta/agents/vaults/credentials.ts +51 -28
- package/src/resources/beta/agents/vaults/vaults.ts +42 -22
- package/src/resources/beta/assistants.ts +51 -28
- package/src/resources/beta/beta.ts +2 -0
- package/src/resources/beta/chatkit/sessions.ts +24 -11
- package/src/resources/beta/chatkit/threads.ts +35 -18
- package/src/resources/beta/index.ts +1 -0
- package/src/resources/beta/responses/input-items.ts +214 -3
- package/src/resources/beta/responses/input-tokens.ts +22 -9
- package/src/resources/beta/responses/responses.ts +332 -49
- package/src/resources/beta/threads/messages.ts +51 -28
- package/src/resources/beta/threads/runs/runs.ts +65 -39
- package/src/resources/beta/threads/runs/steps.ts +26 -12
- package/src/resources/beta/threads/threads.ts +52 -30
- package/src/resources/chat/completions/completions.ts +41 -24
- package/src/resources/chat/completions/messages.ts +12 -1
- package/src/resources/completions.ts +16 -6
- package/src/resources/containers/containers.ts +36 -15
- package/src/resources/containers/files/content.ts +16 -6
- package/src/resources/containers/files/files.ts +34 -15
- package/src/resources/content-provenance-checks.ts +10 -1
- package/src/resources/conversations/conversations.ts +31 -14
- package/src/resources/conversations/items.ts +33 -16
- package/src/resources/evals/evals.ts +40 -9
- package/src/resources/evals/runs/output-items.ts +16 -5
- package/src/resources/evals/runs/runs.ts +36 -22
- package/src/resources/files.ts +36 -14
- package/src/resources/fine-tuning/alpha/graders.ts +23 -10
- package/src/resources/fine-tuning/checkpoints/permissions.ts +30 -8
- package/src/resources/fine-tuning/jobs/checkpoints.ts +12 -1
- package/src/resources/fine-tuning/jobs/jobs.ts +45 -23
- package/src/resources/images.ts +30 -16
- package/src/resources/live/live.ts +15 -1
- package/src/resources/live/sessions.ts +59 -34
- package/src/resources/models.ts +20 -3
- package/src/resources/moderations.ts +15 -1
- package/src/resources/realtime/calls.ts +58 -37
- package/src/resources/realtime/client-secrets.ts +15 -5
- package/src/resources/responses/input-items.ts +15 -1
- package/src/resources/responses/input-tokens.ts +18 -5
- package/src/resources/responses/responses.ts +50 -22
- package/src/resources/safety/alerts.ts +11 -1
- package/src/resources/safety/cases.ts +11 -1
- package/src/resources/safety/safety.ts +4 -4
- package/src/resources/shared.ts +2 -0
- package/src/resources/skills/content.ts +16 -6
- package/src/resources/skills/skills.ts +32 -12
- package/src/resources/skills/versions/content.ts +16 -6
- package/src/resources/skills/versions/versions.ts +24 -13
- package/src/resources/uploads/parts.ts +10 -1
- package/src/resources/uploads/uploads.ts +27 -10
- package/src/resources/vector-stores/file-batches.ts +34 -18
- package/src/resources/vector-stores/files.ts +53 -30
- package/src/resources/vector-stores/vector-stores.ts +53 -30
- package/src/resources/videos.ts +56 -23
- package/src/resources/webhooks/event-types.ts +11 -1
- package/src/resources/webhooks/webhooks.ts +56 -29
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -11,6 +11,13 @@ import { RequestOptions } from '../../../internal/request-options';
|
|
|
11
11
|
import { maybeMultipartFormRequestOptions } from '../../../internal/uploads';
|
|
12
12
|
import { path } from '../../../internal/utils/path';
|
|
13
13
|
|
|
14
|
+
function resolveResourceRequestOptions(
|
|
15
|
+
options: RequestOptions | undefined,
|
|
16
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
17
|
+
): Promise<RequestOptions> {
|
|
18
|
+
return Promise.resolve(options).then(buildOptions);
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
15
22
|
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
16
23
|
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
@@ -134,7 +141,12 @@ export class Files extends APIResource {
|
|
|
134
141
|
): APIPromise<FileCreateResponse> {
|
|
135
142
|
return this._client.post(
|
|
136
143
|
path`/containers/${containerID}/files`,
|
|
137
|
-
|
|
144
|
+
resolveResourceRequestOptions(options, (options) =>
|
|
145
|
+
maybeMultipartFormRequestOptions(
|
|
146
|
+
{ body, ...options, __security: { bearerAuth: true } },
|
|
147
|
+
this._client,
|
|
148
|
+
),
|
|
149
|
+
),
|
|
138
150
|
);
|
|
139
151
|
}
|
|
140
152
|
|
|
@@ -147,10 +159,10 @@ export class Files extends APIResource {
|
|
|
147
159
|
options?: RequestOptions,
|
|
148
160
|
): APIPromise<FileRetrieveResponse> {
|
|
149
161
|
const { container_id } = params;
|
|
150
|
-
return this._client.get(
|
|
151
|
-
|
|
152
|
-
__security: { bearerAuth: true },
|
|
153
|
-
|
|
162
|
+
return this._client.get(
|
|
163
|
+
path`/containers/${container_id}/files/${fileID}`,
|
|
164
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
165
|
+
);
|
|
154
166
|
}
|
|
155
167
|
|
|
156
168
|
/**
|
|
@@ -255,11 +267,15 @@ export class Files extends APIResource {
|
|
|
255
267
|
query = {};
|
|
256
268
|
}
|
|
257
269
|
query = query as FileListParams | null | undefined;
|
|
258
|
-
return this._client.getAPIList(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
270
|
+
return this._client.getAPIList(
|
|
271
|
+
path`/containers/${containerID}/files`,
|
|
272
|
+
CursorPage<FileListResponse>,
|
|
273
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
274
|
+
query,
|
|
275
|
+
...options,
|
|
276
|
+
__security: { bearerAuth: true },
|
|
277
|
+
})),
|
|
278
|
+
);
|
|
263
279
|
}
|
|
264
280
|
|
|
265
281
|
/**
|
|
@@ -267,11 +283,14 @@ export class Files extends APIResource {
|
|
|
267
283
|
*/
|
|
268
284
|
delete(fileID: string, params: FileDeleteParams, options?: RequestOptions): APIPromise<void> {
|
|
269
285
|
const { container_id } = params;
|
|
270
|
-
return this._client.delete(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
286
|
+
return this._client.delete(
|
|
287
|
+
path`/containers/${container_id}/files/${fileID}`,
|
|
288
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
289
|
+
...options,
|
|
290
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
291
|
+
__security: { bearerAuth: true },
|
|
292
|
+
})),
|
|
293
|
+
);
|
|
275
294
|
}
|
|
276
295
|
}
|
|
277
296
|
|
|
@@ -6,6 +6,13 @@ import { type Uploadable } from '../core/uploads';
|
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
7
|
import { multipartFormRequestOptions } from '../internal/uploads';
|
|
8
8
|
|
|
9
|
+
function resolveResourceRequestOptions(
|
|
10
|
+
options: RequestOptions | undefined,
|
|
11
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
12
|
+
): Promise<RequestOptions> {
|
|
13
|
+
return Promise.resolve(options).then(buildOptions);
|
|
14
|
+
}
|
|
15
|
+
|
|
9
16
|
export class ContentProvenanceChecks extends APIResource {
|
|
10
17
|
/**
|
|
11
18
|
* Check whether an image or audio file contains known OpenAI provenance signals.
|
|
@@ -24,7 +31,9 @@ export class ContentProvenanceChecks extends APIResource {
|
|
|
24
31
|
): APIPromise<ContentProvenanceCheck> {
|
|
25
32
|
return this._client.post(
|
|
26
33
|
'/content_provenance_checks',
|
|
27
|
-
|
|
34
|
+
resolveResourceRequestOptions(options, (options) =>
|
|
35
|
+
multipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client),
|
|
36
|
+
),
|
|
28
37
|
);
|
|
29
38
|
}
|
|
30
39
|
}
|
|
@@ -18,6 +18,13 @@ import { APIPromise } from '../../core/api-promise';
|
|
|
18
18
|
import { RequestOptions } from '../../internal/request-options';
|
|
19
19
|
import { path } from '../../internal/utils/path';
|
|
20
20
|
|
|
21
|
+
function resolveResourceRequestOptions(
|
|
22
|
+
options: RequestOptions | undefined,
|
|
23
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
24
|
+
): Promise<RequestOptions> {
|
|
25
|
+
return Promise.resolve(options).then(buildOptions);
|
|
26
|
+
}
|
|
27
|
+
|
|
21
28
|
/**
|
|
22
29
|
* Manage conversations and conversation items.
|
|
23
30
|
*/
|
|
@@ -31,17 +38,24 @@ export class Conversations extends APIResource {
|
|
|
31
38
|
body: ConversationCreateParams | null | undefined = {},
|
|
32
39
|
options?: RequestOptions,
|
|
33
40
|
): APIPromise<Conversation> {
|
|
34
|
-
return this._client.post(
|
|
41
|
+
return this._client.post(
|
|
42
|
+
'/conversations',
|
|
43
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
44
|
+
body,
|
|
45
|
+
...options,
|
|
46
|
+
__security: { bearerAuth: true },
|
|
47
|
+
})),
|
|
48
|
+
);
|
|
35
49
|
}
|
|
36
50
|
|
|
37
51
|
/**
|
|
38
52
|
* Get a conversation
|
|
39
53
|
*/
|
|
40
54
|
retrieve(conversationID: string, options?: RequestOptions): APIPromise<Conversation> {
|
|
41
|
-
return this._client.get(
|
|
42
|
-
|
|
43
|
-
__security: { bearerAuth: true },
|
|
44
|
-
|
|
55
|
+
return this._client.get(
|
|
56
|
+
path`/conversations/${conversationID}`,
|
|
57
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
58
|
+
);
|
|
45
59
|
}
|
|
46
60
|
|
|
47
61
|
/**
|
|
@@ -52,21 +66,24 @@ export class Conversations extends APIResource {
|
|
|
52
66
|
body: ConversationUpdateParams,
|
|
53
67
|
options?: RequestOptions,
|
|
54
68
|
): APIPromise<Conversation> {
|
|
55
|
-
return this._client.post(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
69
|
+
return this._client.post(
|
|
70
|
+
path`/conversations/${conversationID}`,
|
|
71
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
72
|
+
body,
|
|
73
|
+
...options,
|
|
74
|
+
__security: { bearerAuth: true },
|
|
75
|
+
})),
|
|
76
|
+
);
|
|
60
77
|
}
|
|
61
78
|
|
|
62
79
|
/**
|
|
63
80
|
* Delete a conversation. Items in the conversation will not be deleted.
|
|
64
81
|
*/
|
|
65
82
|
delete(conversationID: string, options?: RequestOptions): APIPromise<ConversationDeletedResource> {
|
|
66
|
-
return this._client.delete(
|
|
67
|
-
|
|
68
|
-
__security: { bearerAuth: true },
|
|
69
|
-
|
|
83
|
+
return this._client.delete(
|
|
84
|
+
path`/conversations/${conversationID}`,
|
|
85
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
86
|
+
);
|
|
70
87
|
}
|
|
71
88
|
}
|
|
72
89
|
|
|
@@ -12,6 +12,13 @@ import {
|
|
|
12
12
|
import { RequestOptions } from '../../internal/request-options';
|
|
13
13
|
import { path } from '../../internal/utils/path';
|
|
14
14
|
|
|
15
|
+
function resolveResourceRequestOptions(
|
|
16
|
+
options: RequestOptions | undefined,
|
|
17
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
18
|
+
): Promise<RequestOptions> {
|
|
19
|
+
return Promise.resolve(options).then(buildOptions);
|
|
20
|
+
}
|
|
21
|
+
|
|
15
22
|
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
16
23
|
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
17
24
|
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
@@ -132,12 +139,15 @@ export class Items extends APIResource {
|
|
|
132
139
|
options?: RequestOptions,
|
|
133
140
|
): APIPromise<ConversationItemList> {
|
|
134
141
|
const { include, ...body } = params;
|
|
135
|
-
return this._client.post(
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
return this._client.post(
|
|
143
|
+
path`/conversations/${conversationID}/items`,
|
|
144
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
145
|
+
query: { include },
|
|
146
|
+
body,
|
|
147
|
+
...options,
|
|
148
|
+
__security: { bearerAuth: true },
|
|
149
|
+
})),
|
|
150
|
+
);
|
|
141
151
|
}
|
|
142
152
|
|
|
143
153
|
/**
|
|
@@ -149,11 +159,14 @@ export class Items extends APIResource {
|
|
|
149
159
|
options?: RequestOptions,
|
|
150
160
|
): APIPromise<ConversationItem> {
|
|
151
161
|
const { conversation_id, ...query } = params;
|
|
152
|
-
return this._client.get(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
162
|
+
return this._client.get(
|
|
163
|
+
path`/conversations/${conversation_id}/items/${itemID}`,
|
|
164
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
165
|
+
query,
|
|
166
|
+
...options,
|
|
167
|
+
__security: { bearerAuth: true },
|
|
168
|
+
})),
|
|
169
|
+
);
|
|
157
170
|
}
|
|
158
171
|
|
|
159
172
|
/**
|
|
@@ -261,7 +274,11 @@ export class Items extends APIResource {
|
|
|
261
274
|
return this._client.getAPIList(
|
|
262
275
|
path`/conversations/${conversationID}/items`,
|
|
263
276
|
ConversationCursorPage<ConversationItem>,
|
|
264
|
-
|
|
277
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
278
|
+
query,
|
|
279
|
+
...options,
|
|
280
|
+
__security: { bearerAuth: true },
|
|
281
|
+
})),
|
|
265
282
|
);
|
|
266
283
|
}
|
|
267
284
|
|
|
@@ -274,10 +291,10 @@ export class Items extends APIResource {
|
|
|
274
291
|
options?: RequestOptions,
|
|
275
292
|
): APIPromise<ConversationsAPI.Conversation> {
|
|
276
293
|
const { conversation_id } = params;
|
|
277
|
-
return this._client.delete(
|
|
278
|
-
|
|
279
|
-
__security: { bearerAuth: true },
|
|
280
|
-
|
|
294
|
+
return this._client.delete(
|
|
295
|
+
path`/conversations/${conversation_id}/items/${itemID}`,
|
|
296
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
297
|
+
);
|
|
281
298
|
}
|
|
282
299
|
}
|
|
283
300
|
|
|
@@ -27,6 +27,13 @@ import { CursorPage, type CursorPageParams, PagePromise } from '../../core/pagin
|
|
|
27
27
|
import { RequestOptions } from '../../internal/request-options';
|
|
28
28
|
import { path } from '../../internal/utils/path';
|
|
29
29
|
|
|
30
|
+
function resolveResourceRequestOptions(
|
|
31
|
+
options: RequestOptions | undefined,
|
|
32
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
33
|
+
): Promise<RequestOptions> {
|
|
34
|
+
return Promise.resolve(options).then(buildOptions);
|
|
35
|
+
}
|
|
36
|
+
|
|
30
37
|
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
31
38
|
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
32
39
|
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
@@ -149,21 +156,38 @@ export class Evals extends APIResource {
|
|
|
149
156
|
* the [Evals guide](https://developers.openai.com/api/docs/guides/evals).
|
|
150
157
|
*/
|
|
151
158
|
create(body: EvalCreateParams, options?: RequestOptions): APIPromise<EvalCreateResponse> {
|
|
152
|
-
return this._client.post(
|
|
159
|
+
return this._client.post(
|
|
160
|
+
'/evals',
|
|
161
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
162
|
+
body,
|
|
163
|
+
...options,
|
|
164
|
+
__security: { bearerAuth: true },
|
|
165
|
+
})),
|
|
166
|
+
);
|
|
153
167
|
}
|
|
154
168
|
|
|
155
169
|
/**
|
|
156
170
|
* Get an evaluation by ID.
|
|
157
171
|
*/
|
|
158
172
|
retrieve(evalID: string, options?: RequestOptions): APIPromise<EvalRetrieveResponse> {
|
|
159
|
-
return this._client.get(
|
|
173
|
+
return this._client.get(
|
|
174
|
+
path`/evals/${evalID}`,
|
|
175
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
176
|
+
);
|
|
160
177
|
}
|
|
161
178
|
|
|
162
179
|
/**
|
|
163
180
|
* Update certain properties of an evaluation.
|
|
164
181
|
*/
|
|
165
182
|
update(evalID: string, body: EvalUpdateParams, options?: RequestOptions): APIPromise<EvalUpdateResponse> {
|
|
166
|
-
return this._client.post(
|
|
183
|
+
return this._client.post(
|
|
184
|
+
path`/evals/${evalID}`,
|
|
185
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
186
|
+
body,
|
|
187
|
+
...options,
|
|
188
|
+
__security: { bearerAuth: true },
|
|
189
|
+
})),
|
|
190
|
+
);
|
|
167
191
|
}
|
|
168
192
|
|
|
169
193
|
/**
|
|
@@ -265,18 +289,25 @@ export class Evals extends APIResource {
|
|
|
265
289
|
query = {};
|
|
266
290
|
}
|
|
267
291
|
query = query as EvalListParams | null | undefined;
|
|
268
|
-
return this._client.getAPIList(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
292
|
+
return this._client.getAPIList(
|
|
293
|
+
'/evals',
|
|
294
|
+
CursorPage<EvalListResponse>,
|
|
295
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
296
|
+
query,
|
|
297
|
+
...options,
|
|
298
|
+
__security: { bearerAuth: true },
|
|
299
|
+
})),
|
|
300
|
+
);
|
|
273
301
|
}
|
|
274
302
|
|
|
275
303
|
/**
|
|
276
304
|
* Delete an evaluation.
|
|
277
305
|
*/
|
|
278
306
|
delete(evalID: string, options?: RequestOptions): APIPromise<EvalDeleteResponse> {
|
|
279
|
-
return this._client.delete(
|
|
307
|
+
return this._client.delete(
|
|
308
|
+
path`/evals/${evalID}`,
|
|
309
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
310
|
+
);
|
|
280
311
|
}
|
|
281
312
|
}
|
|
282
313
|
|
|
@@ -7,6 +7,13 @@ import { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pa
|
|
|
7
7
|
import { RequestOptions } from '../../../internal/request-options';
|
|
8
8
|
import { path } from '../../../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
function resolveResourceRequestOptions(
|
|
11
|
+
options: RequestOptions | undefined,
|
|
12
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
13
|
+
): Promise<RequestOptions> {
|
|
14
|
+
return Promise.resolve(options).then(buildOptions);
|
|
15
|
+
}
|
|
16
|
+
|
|
10
17
|
/**
|
|
11
18
|
* Manage and run evals in the OpenAI platform.
|
|
12
19
|
*/
|
|
@@ -20,10 +27,10 @@ export class OutputItems extends APIResource {
|
|
|
20
27
|
options?: RequestOptions,
|
|
21
28
|
): APIPromise<OutputItemRetrieveResponse> {
|
|
22
29
|
const { eval_id, run_id } = params;
|
|
23
|
-
return this._client.get(
|
|
24
|
-
|
|
25
|
-
__security: { bearerAuth: true },
|
|
26
|
-
|
|
30
|
+
return this._client.get(
|
|
31
|
+
path`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`,
|
|
32
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
33
|
+
);
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
/**
|
|
@@ -38,7 +45,11 @@ export class OutputItems extends APIResource {
|
|
|
38
45
|
return this._client.getAPIList(
|
|
39
46
|
path`/evals/${eval_id}/runs/${runID}/output_items`,
|
|
40
47
|
CursorPage<OutputItemListResponse>,
|
|
41
|
-
|
|
48
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
49
|
+
query,
|
|
50
|
+
...options,
|
|
51
|
+
__security: { bearerAuth: true },
|
|
52
|
+
})),
|
|
42
53
|
);
|
|
43
54
|
}
|
|
44
55
|
}
|
|
@@ -19,6 +19,13 @@ import { CursorPage, type CursorPageParams, PagePromise } from '../../../core/pa
|
|
|
19
19
|
import { RequestOptions } from '../../../internal/request-options';
|
|
20
20
|
import { path } from '../../../internal/utils/path';
|
|
21
21
|
|
|
22
|
+
function resolveResourceRequestOptions(
|
|
23
|
+
options: RequestOptions | undefined,
|
|
24
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
25
|
+
): Promise<RequestOptions> {
|
|
26
|
+
return Promise.resolve(options).then(buildOptions);
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
23
30
|
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
24
31
|
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
@@ -138,11 +145,14 @@ export class Runs extends APIResource {
|
|
|
138
145
|
* schema specified in the config of the evaluation.
|
|
139
146
|
*/
|
|
140
147
|
create(evalID: string, body: RunCreateParams, options?: RequestOptions): APIPromise<RunCreateResponse> {
|
|
141
|
-
return this._client.post(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
return this._client.post(
|
|
149
|
+
path`/evals/${evalID}/runs`,
|
|
150
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
151
|
+
body,
|
|
152
|
+
...options,
|
|
153
|
+
__security: { bearerAuth: true },
|
|
154
|
+
})),
|
|
155
|
+
);
|
|
146
156
|
}
|
|
147
157
|
|
|
148
158
|
/**
|
|
@@ -154,10 +164,10 @@ export class Runs extends APIResource {
|
|
|
154
164
|
options?: RequestOptions,
|
|
155
165
|
): APIPromise<RunRetrieveResponse> {
|
|
156
166
|
const { eval_id } = params;
|
|
157
|
-
return this._client.get(
|
|
158
|
-
|
|
159
|
-
__security: { bearerAuth: true },
|
|
160
|
-
|
|
167
|
+
return this._client.get(
|
|
168
|
+
path`/evals/${eval_id}/runs/${runID}`,
|
|
169
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
170
|
+
);
|
|
161
171
|
}
|
|
162
172
|
|
|
163
173
|
/**
|
|
@@ -262,11 +272,15 @@ export class Runs extends APIResource {
|
|
|
262
272
|
query = {};
|
|
263
273
|
}
|
|
264
274
|
query = query as RunListParams | null | undefined;
|
|
265
|
-
return this._client.getAPIList(
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
275
|
+
return this._client.getAPIList(
|
|
276
|
+
path`/evals/${evalID}/runs`,
|
|
277
|
+
CursorPage<RunListResponse>,
|
|
278
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
279
|
+
query,
|
|
280
|
+
...options,
|
|
281
|
+
__security: { bearerAuth: true },
|
|
282
|
+
})),
|
|
283
|
+
);
|
|
270
284
|
}
|
|
271
285
|
|
|
272
286
|
/**
|
|
@@ -274,10 +288,10 @@ export class Runs extends APIResource {
|
|
|
274
288
|
*/
|
|
275
289
|
delete(runID: string, params: RunDeleteParams, options?: RequestOptions): APIPromise<RunDeleteResponse> {
|
|
276
290
|
const { eval_id } = params;
|
|
277
|
-
return this._client.delete(
|
|
278
|
-
|
|
279
|
-
__security: { bearerAuth: true },
|
|
280
|
-
|
|
291
|
+
return this._client.delete(
|
|
292
|
+
path`/evals/${eval_id}/runs/${runID}`,
|
|
293
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
294
|
+
);
|
|
281
295
|
}
|
|
282
296
|
|
|
283
297
|
/**
|
|
@@ -285,10 +299,10 @@ export class Runs extends APIResource {
|
|
|
285
299
|
*/
|
|
286
300
|
cancel(runID: string, params: RunCancelParams, options?: RequestOptions): APIPromise<RunCancelResponse> {
|
|
287
301
|
const { eval_id } = params;
|
|
288
|
-
return this._client.post(
|
|
289
|
-
|
|
290
|
-
__security: { bearerAuth: true },
|
|
291
|
-
|
|
302
|
+
return this._client.post(
|
|
303
|
+
path`/evals/${eval_id}/runs/${runID}`,
|
|
304
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
305
|
+
);
|
|
292
306
|
}
|
|
293
307
|
}
|
|
294
308
|
|
package/src/resources/files.ts
CHANGED
|
@@ -10,6 +10,13 @@ import { multipartFormRequestOptions } from '../internal/uploads';
|
|
|
10
10
|
import { waitForFileProcessing } from '../lib/file-processing';
|
|
11
11
|
import { path } from '../internal/utils/path';
|
|
12
12
|
|
|
13
|
+
function resolveResourceRequestOptions(
|
|
14
|
+
options: RequestOptions | undefined,
|
|
15
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
16
|
+
): Promise<RequestOptions> {
|
|
17
|
+
return Promise.resolve(options).then(buildOptions);
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
// Recognizable options across SDK runtime versions. Keep this independent of
|
|
14
21
|
// private RequestOptions fields so older handwritten runtimes still compile.
|
|
15
22
|
const normalizeRequestOptionsForQueryKeys = new Set([
|
|
@@ -153,7 +160,9 @@ export class Files extends APIResource {
|
|
|
153
160
|
create(body: FileCreateParams, options?: RequestOptions): APIPromise<FileObject> {
|
|
154
161
|
return this._client.post(
|
|
155
162
|
'/files',
|
|
156
|
-
|
|
163
|
+
resolveResourceRequestOptions(options, (options) =>
|
|
164
|
+
multipartFormRequestOptions({ body, ...options, __security: { bearerAuth: true } }, this._client),
|
|
165
|
+
),
|
|
157
166
|
);
|
|
158
167
|
}
|
|
159
168
|
|
|
@@ -161,7 +170,10 @@ export class Files extends APIResource {
|
|
|
161
170
|
* Returns information about a specific file.
|
|
162
171
|
*/
|
|
163
172
|
retrieve(fileID: string, options?: RequestOptions): APIPromise<FileObject> {
|
|
164
|
-
return this._client.get(
|
|
173
|
+
return this._client.get(
|
|
174
|
+
path`/files/${fileID}`,
|
|
175
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
176
|
+
);
|
|
165
177
|
}
|
|
166
178
|
|
|
167
179
|
/**
|
|
@@ -263,30 +275,40 @@ export class Files extends APIResource {
|
|
|
263
275
|
query = {};
|
|
264
276
|
}
|
|
265
277
|
query = query as FileListParams | null | undefined;
|
|
266
|
-
return this._client.getAPIList(
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
278
|
+
return this._client.getAPIList(
|
|
279
|
+
'/files',
|
|
280
|
+
CursorPage<FileObject>,
|
|
281
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
282
|
+
query,
|
|
283
|
+
...options,
|
|
284
|
+
__security: { bearerAuth: true },
|
|
285
|
+
})),
|
|
286
|
+
);
|
|
271
287
|
}
|
|
272
288
|
|
|
273
289
|
/**
|
|
274
290
|
* Delete a file and remove it from all vector stores.
|
|
275
291
|
*/
|
|
276
292
|
delete(fileID: string, options?: RequestOptions): APIPromise<FileDeleted> {
|
|
277
|
-
return this._client.delete(
|
|
293
|
+
return this._client.delete(
|
|
294
|
+
path`/files/${fileID}`,
|
|
295
|
+
resolveResourceRequestOptions(options, (options) => ({ ...options, __security: { bearerAuth: true } })),
|
|
296
|
+
);
|
|
278
297
|
}
|
|
279
298
|
|
|
280
299
|
/**
|
|
281
300
|
* Returns a response containing the contents of the specified file.
|
|
282
301
|
*/
|
|
283
302
|
content(fileID: string, options?: RequestOptions): APIPromise<Response> {
|
|
284
|
-
return this._client.get(
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
303
|
+
return this._client.get(
|
|
304
|
+
path`/files/${fileID}/content`,
|
|
305
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
306
|
+
...options,
|
|
307
|
+
headers: buildHeaders([{ Accept: 'application/binary' }, options?.headers]),
|
|
308
|
+
__security: { bearerAuth: true },
|
|
309
|
+
__binaryResponse: true,
|
|
310
|
+
})),
|
|
311
|
+
);
|
|
290
312
|
}
|
|
291
313
|
|
|
292
314
|
/**
|
|
@@ -5,6 +5,13 @@ import * as GraderModelsAPI from '../../graders/grader-models';
|
|
|
5
5
|
import { APIPromise } from '../../../core/api-promise';
|
|
6
6
|
import { RequestOptions } from '../../../internal/request-options';
|
|
7
7
|
|
|
8
|
+
function resolveResourceRequestOptions(
|
|
9
|
+
options: RequestOptions | undefined,
|
|
10
|
+
buildOptions: (options: RequestOptions | undefined) => RequestOptions | Promise<RequestOptions>,
|
|
11
|
+
): Promise<RequestOptions> {
|
|
12
|
+
return Promise.resolve(options).then(buildOptions);
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
/**
|
|
9
16
|
* Manage fine-tuning jobs to tailor a model to your specific training data.
|
|
10
17
|
*/
|
|
@@ -27,11 +34,14 @@ export class Graders extends APIResource {
|
|
|
27
34
|
* ```
|
|
28
35
|
*/
|
|
29
36
|
run(body: GraderRunParams, options?: RequestOptions): APIPromise<GraderRunResponse> {
|
|
30
|
-
return this._client.post(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
return this._client.post(
|
|
38
|
+
'/fine_tuning/alpha/graders/run',
|
|
39
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
40
|
+
body,
|
|
41
|
+
...options,
|
|
42
|
+
__security: { bearerAuth: true },
|
|
43
|
+
})),
|
|
44
|
+
);
|
|
35
45
|
}
|
|
36
46
|
|
|
37
47
|
/**
|
|
@@ -52,11 +62,14 @@ export class Graders extends APIResource {
|
|
|
52
62
|
* ```
|
|
53
63
|
*/
|
|
54
64
|
validate(body: GraderValidateParams, options?: RequestOptions): APIPromise<GraderValidateResponse> {
|
|
55
|
-
return this._client.post(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
return this._client.post(
|
|
66
|
+
'/fine_tuning/alpha/graders/validate',
|
|
67
|
+
resolveResourceRequestOptions(options, (options) => ({
|
|
68
|
+
body,
|
|
69
|
+
...options,
|
|
70
|
+
__security: { bearerAuth: true },
|
|
71
|
+
})),
|
|
72
|
+
);
|
|
60
73
|
}
|
|
61
74
|
}
|
|
62
75
|
|