@deeprelay/sdk 0.2.0 → 0.3.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/.openapi-generator/FILES +66 -0
- package/README.md +47 -11
- package/dist/apis/AlertsApi.d.ts +50 -0
- package/dist/apis/AlertsApi.js +127 -0
- package/dist/apis/ApiKeysApi.d.ts +107 -0
- package/dist/apis/ApiKeysApi.js +284 -0
- package/dist/apis/BillingApi.d.ts +25 -7
- package/dist/apis/BillingApi.js +57 -7
- package/dist/apis/InferenceApi.d.ts +12 -1
- package/dist/apis/InferenceApi.js +22 -1
- package/dist/apis/MetaApi.d.ts +1 -1
- package/dist/apis/MetaApi.js +1 -1
- package/dist/apis/RequestsApi.d.ts +130 -0
- package/dist/apis/RequestsApi.js +269 -0
- package/dist/apis/UsageApi.d.ts +15 -1
- package/dist/apis/UsageApi.js +19 -2
- package/dist/apis/WebhooksApi.d.ts +1 -1
- package/dist/apis/WebhooksApi.js +1 -1
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +3 -0
- package/dist/esm/apis/AlertsApi.d.ts +50 -0
- package/dist/esm/apis/AlertsApi.js +123 -0
- package/dist/esm/apis/ApiKeysApi.d.ts +107 -0
- package/dist/esm/apis/ApiKeysApi.js +280 -0
- package/dist/esm/apis/BillingApi.d.ts +25 -7
- package/dist/esm/apis/BillingApi.js +57 -7
- package/dist/esm/apis/InferenceApi.d.ts +12 -1
- package/dist/esm/apis/InferenceApi.js +22 -1
- package/dist/esm/apis/MetaApi.d.ts +1 -1
- package/dist/esm/apis/MetaApi.js +1 -1
- package/dist/esm/apis/RequestsApi.d.ts +130 -0
- package/dist/esm/apis/RequestsApi.js +265 -0
- package/dist/esm/apis/UsageApi.d.ts +15 -1
- package/dist/esm/apis/UsageApi.js +18 -1
- package/dist/esm/apis/WebhooksApi.d.ts +1 -1
- package/dist/esm/apis/WebhooksApi.js +1 -1
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/models/AlertEmailToggles.d.ts +50 -0
- package/dist/esm/models/AlertEmailToggles.js +55 -0
- package/dist/esm/models/AlertSettings.d.ts +51 -0
- package/dist/esm/models/AlertSettings.js +56 -0
- package/dist/esm/models/AlertSettingsUpdate.d.ts +39 -0
- package/dist/esm/models/AlertSettingsUpdate.js +48 -0
- package/dist/esm/models/ApiKey.d.ts +123 -0
- package/dist/esm/models/ApiKey.js +96 -0
- package/dist/esm/models/ApiKeyCreate.d.ts +70 -0
- package/dist/esm/models/ApiKeyCreate.js +57 -0
- package/dist/esm/models/ApiKeyCreated.d.ts +129 -0
- package/dist/esm/models/ApiKeyCreated.js +100 -0
- package/dist/esm/models/ApiKeyList.d.ts +33 -0
- package/dist/esm/models/ApiKeyList.js +44 -0
- package/dist/esm/models/ApiKeyScopes.d.ts +65 -0
- package/dist/esm/models/ApiKeyScopes.js +66 -0
- package/dist/esm/models/ApiKeyUpdate.d.ts +62 -0
- package/dist/esm/models/ApiKeyUpdate.js +51 -0
- package/dist/esm/models/Balance.d.ts +1 -1
- package/dist/esm/models/Balance.js +1 -1
- package/dist/esm/models/ChatChoice.d.ts +11 -1
- package/dist/esm/models/ChatChoice.js +3 -1
- package/dist/esm/models/ChatCompletionRequest.d.ts +78 -2
- package/dist/esm/models/ChatCompletionRequest.js +26 -1
- package/dist/esm/models/ChatCompletionRequestResponseFormat.d.ts +31 -0
- package/dist/esm/models/ChatCompletionRequestResponseFormat.js +52 -0
- package/dist/esm/models/ChatCompletionRequestToolChoice.d.ts +23 -0
- package/dist/esm/models/ChatCompletionRequestToolChoice.js +50 -0
- package/dist/esm/models/ChatCompletionResponse.d.ts +1 -1
- package/dist/esm/models/ChatCompletionResponse.js +1 -1
- package/dist/esm/models/ChatMessage.d.ts +22 -2
- package/dist/esm/models/ChatMessage.js +10 -5
- package/dist/esm/models/CostDetails.d.ts +59 -0
- package/dist/esm/models/CostDetails.js +59 -0
- package/dist/esm/models/CreateCryptoDepositRequest.d.ts +4 -1
- package/dist/esm/models/CreateCryptoDepositRequest.js +4 -2
- package/dist/esm/models/CreateWebhookEndpointRequest.d.ts +5 -1
- package/dist/esm/models/CreateWebhookEndpointRequest.js +6 -2
- package/dist/esm/models/CryptoDeposit.d.ts +3 -1
- package/dist/esm/models/CryptoDeposit.js +4 -2
- package/dist/esm/models/Embedding.d.ts +1 -1
- package/dist/esm/models/Embedding.js +1 -1
- package/dist/esm/models/EmbeddingsRequest.d.ts +1 -1
- package/dist/esm/models/EmbeddingsRequest.js +1 -1
- package/dist/esm/models/EmbeddingsRequestInput.d.ts +1 -1
- package/dist/esm/models/EmbeddingsRequestInput.js +1 -1
- package/dist/esm/models/EmbeddingsResponse.d.ts +1 -1
- package/dist/esm/models/EmbeddingsResponse.js +1 -1
- package/dist/esm/models/EmbeddingsUsage.d.ts +1 -1
- package/dist/esm/models/EmbeddingsUsage.js +1 -1
- package/dist/esm/models/GetHealth200Response.d.ts +1 -1
- package/dist/esm/models/GetHealth200Response.js +1 -1
- package/dist/esm/models/ImagesGenerationsRequest.d.ts +2 -2
- package/dist/esm/models/ImagesGenerationsRequest.js +1 -1
- package/dist/esm/models/ImagesResponse.d.ts +1 -1
- package/dist/esm/models/ImagesResponse.js +1 -1
- package/dist/esm/models/ImagesResponseDataInner.d.ts +1 -1
- package/dist/esm/models/ImagesResponseDataInner.js +1 -1
- package/dist/esm/models/ImagesResponseUsage.d.ts +1 -1
- package/dist/esm/models/ImagesResponseUsage.js +1 -1
- package/dist/esm/models/InferencePreflight.d.ts +5 -2
- package/dist/esm/models/InferencePreflight.js +4 -1
- package/dist/esm/models/JSONSchemaFormat.d.ts +54 -0
- package/dist/esm/models/JSONSchemaFormat.js +49 -0
- package/dist/esm/models/ListDeposits200Response.d.ts +1 -1
- package/dist/esm/models/ListDeposits200Response.js +1 -1
- package/dist/esm/models/Model.d.ts +54 -5
- package/dist/esm/models/Model.js +21 -2
- package/dist/esm/models/ModelList.d.ts +1 -1
- package/dist/esm/models/ModelList.js +1 -1
- package/dist/esm/models/ModelMetrics.d.ts +101 -0
- package/dist/esm/models/ModelMetrics.js +85 -0
- package/dist/esm/models/ModelParametersInner.d.ts +1 -1
- package/dist/esm/models/ModelParametersInner.js +1 -1
- package/dist/esm/models/ModelPricing.d.ts +1 -1
- package/dist/esm/models/ModelPricing.js +1 -1
- package/dist/esm/models/ModelRate.d.ts +1 -1
- package/dist/esm/models/ModelRate.js +1 -1
- package/dist/esm/models/OpenAIErrorEnvelope.d.ts +1 -1
- package/dist/esm/models/OpenAIErrorEnvelope.js +1 -1
- package/dist/esm/models/OpenAIErrorEnvelopeError.d.ts +8 -2
- package/dist/esm/models/OpenAIErrorEnvelopeError.js +3 -1
- package/dist/esm/models/PeakWindow.d.ts +1 -1
- package/dist/esm/models/PeakWindow.js +1 -1
- package/dist/esm/models/Problem.d.ts +22 -1
- package/dist/esm/models/Problem.js +14 -1
- package/dist/esm/models/RefereeStatus.d.ts +1 -1
- package/dist/esm/models/RefereeStatus.js +1 -1
- package/dist/esm/models/Referral.d.ts +14 -2
- package/dist/esm/models/Referral.js +9 -1
- package/dist/esm/models/RequestLogEntry.d.ts +210 -0
- package/dist/esm/models/RequestLogEntry.js +129 -0
- package/dist/esm/models/RequestLogPage.d.ts +45 -0
- package/dist/esm/models/RequestLogPage.js +52 -0
- package/dist/esm/models/ResponseFormatJSONObject.d.ts +39 -0
- package/dist/esm/models/ResponseFormatJSONObject.js +51 -0
- package/dist/esm/models/ResponseFormatJSONSchema.d.ts +46 -0
- package/dist/esm/models/ResponseFormatJSONSchema.js +56 -0
- package/dist/esm/models/ResponseFormatText.d.ts +39 -0
- package/dist/esm/models/ResponseFormatText.js +51 -0
- package/dist/esm/models/SpendingLimit.d.ts +1 -1
- package/dist/esm/models/SpendingLimit.js +1 -1
- package/dist/esm/models/StreamOptions.d.ts +1 -1
- package/dist/esm/models/StreamOptions.js +1 -1
- package/dist/esm/models/Subscription.d.ts +9 -2
- package/dist/esm/models/Subscription.js +6 -1
- package/dist/esm/models/SubscriptionCheckoutRequest.d.ts +18 -4
- package/dist/esm/models/SubscriptionCheckoutRequest.js +10 -1
- package/dist/esm/models/SubscriptionCheckoutSession.d.ts +21 -1
- package/dist/esm/models/SubscriptionCheckoutSession.js +12 -1
- package/dist/esm/models/SubscriptionModelUsage.d.ts +68 -0
- package/dist/esm/models/SubscriptionModelUsage.js +67 -0
- package/dist/esm/models/SubscriptionPlan.d.ts +4 -4
- package/dist/esm/models/SubscriptionPlan.js +1 -1
- package/dist/esm/models/SubscriptionPortalRequest.d.ts +1 -1
- package/dist/esm/models/SubscriptionPortalRequest.js +1 -1
- package/dist/esm/models/SubscriptionPortalSession.d.ts +1 -1
- package/dist/esm/models/SubscriptionPortalSession.js +1 -1
- package/dist/esm/models/SubscriptionPrice.d.ts +1 -1
- package/dist/esm/models/SubscriptionPrice.js +1 -1
- package/dist/esm/models/SubscriptionQuota.d.ts +10 -4
- package/dist/esm/models/SubscriptionQuota.js +8 -4
- package/dist/esm/models/SubscriptionTier.d.ts +53 -0
- package/dist/esm/models/SubscriptionTier.js +55 -0
- package/dist/esm/models/SubscriptionUpgradeRequest.d.ts +32 -0
- package/dist/esm/models/SubscriptionUpgradeRequest.js +43 -0
- package/dist/esm/models/SubscriptionUsage.d.ts +28 -3
- package/dist/esm/models/SubscriptionUsage.js +15 -4
- package/dist/esm/models/Tool.d.ts +46 -0
- package/dist/esm/models/Tool.js +56 -0
- package/dist/esm/models/ToolCall.d.ts +60 -0
- package/dist/esm/models/ToolCall.js +56 -0
- package/dist/esm/models/ToolCallFunction.d.ts +39 -0
- package/dist/esm/models/ToolCallFunction.js +47 -0
- package/dist/esm/models/ToolChoiceFunction.d.ts +46 -0
- package/dist/esm/models/ToolChoiceFunction.js +56 -0
- package/dist/esm/models/ToolChoiceFunctionFunction.d.ts +32 -0
- package/dist/esm/models/ToolChoiceFunctionFunction.js +43 -0
- package/dist/esm/models/ToolFunction.d.ts +47 -0
- package/dist/esm/models/ToolFunction.js +47 -0
- package/dist/esm/models/UpdateSpendingLimitRequest.d.ts +1 -1
- package/dist/esm/models/UpdateSpendingLimitRequest.js +1 -1
- package/dist/esm/models/Usage.d.ts +29 -1
- package/dist/esm/models/Usage.js +12 -1
- package/dist/esm/models/UsageBucket.d.ts +39 -6
- package/dist/esm/models/UsageBucket.js +11 -1
- package/dist/esm/models/UsageCompletionTokensDetails.d.ts +32 -0
- package/dist/esm/models/UsageCompletionTokensDetails.js +41 -0
- package/dist/esm/models/UsagePage.d.ts +2 -1
- package/dist/esm/models/UsagePage.js +1 -1
- package/dist/esm/models/UsagePromptTokensDetails.d.ts +33 -0
- package/dist/esm/models/UsagePromptTokensDetails.js +41 -0
- package/dist/esm/models/VideoCreateRequest.d.ts +1 -1
- package/dist/esm/models/VideoCreateRequest.js +1 -1
- package/dist/esm/models/VideoJob.d.ts +1 -1
- package/dist/esm/models/VideoJob.js +1 -1
- package/dist/esm/models/VideoList.d.ts +1 -1
- package/dist/esm/models/VideoList.js +1 -1
- package/dist/esm/models/WebhookEndpoint.d.ts +5 -1
- package/dist/esm/models/WebhookEndpoint.js +6 -2
- package/dist/esm/models/WebhookEndpointPage.d.ts +1 -1
- package/dist/esm/models/WebhookEndpointPage.js +1 -1
- package/dist/esm/models/index.d.ts +30 -0
- package/dist/esm/models/index.js +30 -0
- package/dist/esm/runtime.d.ts +1 -1
- package/dist/esm/runtime.js +2 -2
- package/dist/models/AlertEmailToggles.d.ts +50 -0
- package/dist/models/AlertEmailToggles.js +62 -0
- package/dist/models/AlertSettings.d.ts +51 -0
- package/dist/models/AlertSettings.js +63 -0
- package/dist/models/AlertSettingsUpdate.d.ts +39 -0
- package/dist/models/AlertSettingsUpdate.js +55 -0
- package/dist/models/ApiKey.d.ts +123 -0
- package/dist/models/ApiKey.js +103 -0
- package/dist/models/ApiKeyCreate.d.ts +70 -0
- package/dist/models/ApiKeyCreate.js +64 -0
- package/dist/models/ApiKeyCreated.d.ts +129 -0
- package/dist/models/ApiKeyCreated.js +107 -0
- package/dist/models/ApiKeyList.d.ts +33 -0
- package/dist/models/ApiKeyList.js +51 -0
- package/dist/models/ApiKeyScopes.d.ts +65 -0
- package/dist/models/ApiKeyScopes.js +74 -0
- package/dist/models/ApiKeyUpdate.d.ts +62 -0
- package/dist/models/ApiKeyUpdate.js +58 -0
- package/dist/models/Balance.d.ts +1 -1
- package/dist/models/Balance.js +1 -1
- package/dist/models/ChatChoice.d.ts +11 -1
- package/dist/models/ChatChoice.js +3 -1
- package/dist/models/ChatCompletionRequest.d.ts +78 -2
- package/dist/models/ChatCompletionRequest.js +26 -1
- package/dist/models/ChatCompletionRequestResponseFormat.d.ts +31 -0
- package/dist/models/ChatCompletionRequestResponseFormat.js +58 -0
- package/dist/models/ChatCompletionRequestToolChoice.d.ts +23 -0
- package/dist/models/ChatCompletionRequestToolChoice.js +56 -0
- package/dist/models/ChatCompletionResponse.d.ts +1 -1
- package/dist/models/ChatCompletionResponse.js +1 -1
- package/dist/models/ChatMessage.d.ts +22 -2
- package/dist/models/ChatMessage.js +10 -5
- package/dist/models/CostDetails.d.ts +59 -0
- package/dist/models/CostDetails.js +66 -0
- package/dist/models/CreateCryptoDepositRequest.d.ts +4 -1
- package/dist/models/CreateCryptoDepositRequest.js +4 -2
- package/dist/models/CreateWebhookEndpointRequest.d.ts +5 -1
- package/dist/models/CreateWebhookEndpointRequest.js +6 -2
- package/dist/models/CryptoDeposit.d.ts +3 -1
- package/dist/models/CryptoDeposit.js +4 -2
- package/dist/models/Embedding.d.ts +1 -1
- package/dist/models/Embedding.js +1 -1
- package/dist/models/EmbeddingsRequest.d.ts +1 -1
- package/dist/models/EmbeddingsRequest.js +1 -1
- package/dist/models/EmbeddingsRequestInput.d.ts +1 -1
- package/dist/models/EmbeddingsRequestInput.js +1 -1
- package/dist/models/EmbeddingsResponse.d.ts +1 -1
- package/dist/models/EmbeddingsResponse.js +1 -1
- package/dist/models/EmbeddingsUsage.d.ts +1 -1
- package/dist/models/EmbeddingsUsage.js +1 -1
- package/dist/models/GetHealth200Response.d.ts +1 -1
- package/dist/models/GetHealth200Response.js +1 -1
- package/dist/models/ImagesGenerationsRequest.d.ts +2 -2
- package/dist/models/ImagesGenerationsRequest.js +1 -1
- package/dist/models/ImagesResponse.d.ts +1 -1
- package/dist/models/ImagesResponse.js +1 -1
- package/dist/models/ImagesResponseDataInner.d.ts +1 -1
- package/dist/models/ImagesResponseDataInner.js +1 -1
- package/dist/models/ImagesResponseUsage.d.ts +1 -1
- package/dist/models/ImagesResponseUsage.js +1 -1
- package/dist/models/InferencePreflight.d.ts +5 -2
- package/dist/models/InferencePreflight.js +4 -1
- package/dist/models/JSONSchemaFormat.d.ts +54 -0
- package/dist/models/JSONSchemaFormat.js +56 -0
- package/dist/models/ListDeposits200Response.d.ts +1 -1
- package/dist/models/ListDeposits200Response.js +1 -1
- package/dist/models/Model.d.ts +54 -5
- package/dist/models/Model.js +21 -2
- package/dist/models/ModelList.d.ts +1 -1
- package/dist/models/ModelList.js +1 -1
- package/dist/models/ModelMetrics.d.ts +101 -0
- package/dist/models/ModelMetrics.js +93 -0
- package/dist/models/ModelParametersInner.d.ts +1 -1
- package/dist/models/ModelParametersInner.js +1 -1
- package/dist/models/ModelPricing.d.ts +1 -1
- package/dist/models/ModelPricing.js +1 -1
- package/dist/models/ModelRate.d.ts +1 -1
- package/dist/models/ModelRate.js +1 -1
- package/dist/models/OpenAIErrorEnvelope.d.ts +1 -1
- package/dist/models/OpenAIErrorEnvelope.js +1 -1
- package/dist/models/OpenAIErrorEnvelopeError.d.ts +8 -2
- package/dist/models/OpenAIErrorEnvelopeError.js +3 -1
- package/dist/models/PeakWindow.d.ts +1 -1
- package/dist/models/PeakWindow.js +1 -1
- package/dist/models/Problem.d.ts +22 -1
- package/dist/models/Problem.js +14 -1
- package/dist/models/RefereeStatus.d.ts +1 -1
- package/dist/models/RefereeStatus.js +1 -1
- package/dist/models/Referral.d.ts +14 -2
- package/dist/models/Referral.js +9 -1
- package/dist/models/RequestLogEntry.d.ts +210 -0
- package/dist/models/RequestLogEntry.js +137 -0
- package/dist/models/RequestLogPage.d.ts +45 -0
- package/dist/models/RequestLogPage.js +59 -0
- package/dist/models/ResponseFormatJSONObject.d.ts +39 -0
- package/dist/models/ResponseFormatJSONObject.js +59 -0
- package/dist/models/ResponseFormatJSONSchema.d.ts +46 -0
- package/dist/models/ResponseFormatJSONSchema.js +64 -0
- package/dist/models/ResponseFormatText.d.ts +39 -0
- package/dist/models/ResponseFormatText.js +59 -0
- package/dist/models/SpendingLimit.d.ts +1 -1
- package/dist/models/SpendingLimit.js +1 -1
- package/dist/models/StreamOptions.d.ts +1 -1
- package/dist/models/StreamOptions.js +1 -1
- package/dist/models/Subscription.d.ts +9 -2
- package/dist/models/Subscription.js +6 -1
- package/dist/models/SubscriptionCheckoutRequest.d.ts +18 -4
- package/dist/models/SubscriptionCheckoutRequest.js +11 -1
- package/dist/models/SubscriptionCheckoutSession.d.ts +21 -1
- package/dist/models/SubscriptionCheckoutSession.js +13 -1
- package/dist/models/SubscriptionModelUsage.d.ts +68 -0
- package/dist/models/SubscriptionModelUsage.js +74 -0
- package/dist/models/SubscriptionPlan.d.ts +4 -4
- package/dist/models/SubscriptionPlan.js +1 -1
- package/dist/models/SubscriptionPortalRequest.d.ts +1 -1
- package/dist/models/SubscriptionPortalRequest.js +1 -1
- package/dist/models/SubscriptionPortalSession.d.ts +1 -1
- package/dist/models/SubscriptionPortalSession.js +1 -1
- package/dist/models/SubscriptionPrice.d.ts +1 -1
- package/dist/models/SubscriptionPrice.js +1 -1
- package/dist/models/SubscriptionQuota.d.ts +10 -4
- package/dist/models/SubscriptionQuota.js +8 -4
- package/dist/models/SubscriptionTier.d.ts +53 -0
- package/dist/models/SubscriptionTier.js +62 -0
- package/dist/models/SubscriptionUpgradeRequest.d.ts +32 -0
- package/dist/models/SubscriptionUpgradeRequest.js +50 -0
- package/dist/models/SubscriptionUsage.d.ts +28 -3
- package/dist/models/SubscriptionUsage.js +15 -4
- package/dist/models/Tool.d.ts +46 -0
- package/dist/models/Tool.js +64 -0
- package/dist/models/ToolCall.d.ts +60 -0
- package/dist/models/ToolCall.js +64 -0
- package/dist/models/ToolCallFunction.d.ts +39 -0
- package/dist/models/ToolCallFunction.js +54 -0
- package/dist/models/ToolChoiceFunction.d.ts +46 -0
- package/dist/models/ToolChoiceFunction.js +64 -0
- package/dist/models/ToolChoiceFunctionFunction.d.ts +32 -0
- package/dist/models/ToolChoiceFunctionFunction.js +50 -0
- package/dist/models/ToolFunction.d.ts +47 -0
- package/dist/models/ToolFunction.js +54 -0
- package/dist/models/UpdateSpendingLimitRequest.d.ts +1 -1
- package/dist/models/UpdateSpendingLimitRequest.js +1 -1
- package/dist/models/Usage.d.ts +29 -1
- package/dist/models/Usage.js +12 -1
- package/dist/models/UsageBucket.d.ts +39 -6
- package/dist/models/UsageBucket.js +11 -1
- package/dist/models/UsageCompletionTokensDetails.d.ts +32 -0
- package/dist/models/UsageCompletionTokensDetails.js +48 -0
- package/dist/models/UsagePage.d.ts +2 -1
- package/dist/models/UsagePage.js +1 -1
- package/dist/models/UsagePromptTokensDetails.d.ts +33 -0
- package/dist/models/UsagePromptTokensDetails.js +48 -0
- package/dist/models/VideoCreateRequest.d.ts +1 -1
- package/dist/models/VideoCreateRequest.js +1 -1
- package/dist/models/VideoJob.d.ts +1 -1
- package/dist/models/VideoJob.js +1 -1
- package/dist/models/VideoList.d.ts +1 -1
- package/dist/models/VideoList.js +1 -1
- package/dist/models/WebhookEndpoint.d.ts +5 -1
- package/dist/models/WebhookEndpoint.js +6 -2
- package/dist/models/WebhookEndpointPage.d.ts +1 -1
- package/dist/models/WebhookEndpointPage.js +1 -1
- package/dist/models/index.d.ts +30 -0
- package/dist/models/index.js +30 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -2
- package/docs/AlertEmailToggles.md +40 -0
- package/docs/AlertSettings.md +40 -0
- package/docs/AlertSettingsUpdate.md +36 -0
- package/docs/AlertsApi.md +151 -0
- package/docs/ApiKey.md +65 -0
- package/docs/ApiKeyCreate.md +46 -0
- package/docs/ApiKeyCreated.md +67 -0
- package/docs/ApiKeyList.md +34 -0
- package/docs/ApiKeyScopes.md +38 -0
- package/docs/ApiKeyUpdate.md +45 -0
- package/docs/ApiKeysApi.md +389 -0
- package/docs/BillingApi.md +83 -3
- package/docs/ChatChoice.md +2 -0
- package/docs/ChatCompletionRequest.md +22 -0
- package/docs/ChatCompletionRequestResponseFormat.md +37 -0
- package/docs/ChatCompletionRequestToolChoice.md +37 -0
- package/docs/ChatMessage.md +4 -0
- package/docs/CostDetails.md +43 -0
- package/docs/InferenceApi.md +94 -71
- package/docs/JSONSchemaFormat.md +41 -0
- package/docs/Model.md +16 -0
- package/docs/ModelMetrics.md +55 -0
- package/docs/OpenAIErrorEnvelopeError.md +2 -0
- package/docs/Problem.md +4 -0
- package/docs/Referral.md +6 -2
- package/docs/RequestLogEntry.md +87 -0
- package/docs/RequestLogPage.md +38 -0
- package/docs/RequestsApi.md +282 -0
- package/docs/ResponseFormatJSONObject.md +35 -0
- package/docs/ResponseFormatJSONSchema.md +36 -0
- package/docs/ResponseFormatText.md +34 -0
- package/docs/Subscription.md +3 -1
- package/docs/SubscriptionCheckoutRequest.md +2 -0
- package/docs/SubscriptionCheckoutSession.md +4 -0
- package/docs/SubscriptionModelUsage.md +47 -0
- package/docs/SubscriptionPlan.md +1 -1
- package/docs/SubscriptionQuota.md +5 -3
- package/docs/SubscriptionTier.md +41 -0
- package/docs/SubscriptionUpgradeRequest.md +34 -0
- package/docs/SubscriptionUsage.md +10 -2
- package/docs/Tool.md +36 -0
- package/docs/ToolCall.md +41 -0
- package/docs/ToolCallFunction.md +36 -0
- package/docs/ToolChoiceFunction.md +36 -0
- package/docs/ToolChoiceFunctionFunction.md +34 -0
- package/docs/ToolFunction.md +38 -0
- package/docs/Usage.md +8 -0
- package/docs/UsageApi.md +17 -9
- package/docs/UsageBucket.md +11 -0
- package/docs/UsageCompletionTokensDetails.md +34 -0
- package/docs/UsagePromptTokensDetails.md +35 -0
- package/package.json +1 -1
- package/src/apis/AlertsApi.ts +145 -0
- package/src/apis/ApiKeysApi.ts +357 -0
- package/src/apis/BillingApi.ts +73 -7
- package/src/apis/InferenceApi.ts +32 -1
- package/src/apis/MetaApi.ts +1 -1
- package/src/apis/RequestsApi.ts +335 -0
- package/src/apis/UsageApi.ts +23 -1
- package/src/apis/WebhooksApi.ts +1 -1
- package/src/apis/index.ts +3 -0
- package/src/models/AlertEmailToggles.ts +93 -0
- package/src/models/AlertSettings.ts +101 -0
- package/src/models/AlertSettingsUpdate.ts +83 -0
- package/src/models/ApiKey.ts +205 -0
- package/src/models/ApiKeyCreate.ts +115 -0
- package/src/models/ApiKeyCreated.ts +214 -0
- package/src/models/ApiKeyList.ts +74 -0
- package/src/models/ApiKeyScopes.ts +106 -0
- package/src/models/ApiKeyUpdate.ts +105 -0
- package/src/models/Balance.ts +1 -1
- package/src/models/ChatChoice.ts +11 -1
- package/src/models/ChatCompletionRequest.ts +118 -2
- package/src/models/ChatCompletionRequestResponseFormat.ts +84 -0
- package/src/models/ChatCompletionRequestToolChoice.ts +70 -0
- package/src/models/ChatCompletionResponse.ts +1 -1
- package/src/models/ChatMessage.ts +35 -5
- package/src/models/CostDetails.ts +105 -0
- package/src/models/CreateCryptoDepositRequest.ts +5 -2
- package/src/models/CreateWebhookEndpointRequest.ts +6 -2
- package/src/models/CryptoDeposit.ts +4 -2
- package/src/models/Embedding.ts +1 -1
- package/src/models/EmbeddingsRequest.ts +1 -1
- package/src/models/EmbeddingsRequestInput.ts +1 -1
- package/src/models/EmbeddingsResponse.ts +1 -1
- package/src/models/EmbeddingsUsage.ts +1 -1
- package/src/models/GetHealth200Response.ts +1 -1
- package/src/models/ImagesGenerationsRequest.ts +2 -2
- package/src/models/ImagesResponse.ts +1 -1
- package/src/models/ImagesResponseDataInner.ts +1 -1
- package/src/models/ImagesResponseUsage.ts +1 -1
- package/src/models/InferencePreflight.ts +5 -2
- package/src/models/JSONSchemaFormat.ts +92 -0
- package/src/models/ListDeposits200Response.ts +1 -1
- package/src/models/Model.ts +78 -6
- package/src/models/ModelList.ts +1 -1
- package/src/models/ModelMetrics.ts +165 -0
- package/src/models/ModelParametersInner.ts +1 -1
- package/src/models/ModelPricing.ts +1 -1
- package/src/models/ModelRate.ts +1 -1
- package/src/models/OpenAIErrorEnvelope.ts +1 -1
- package/src/models/OpenAIErrorEnvelopeError.ts +10 -2
- package/src/models/PeakWindow.ts +1 -1
- package/src/models/Problem.ts +26 -1
- package/src/models/RefereeStatus.ts +1 -1
- package/src/models/Referral.ts +20 -2
- package/src/models/RequestLogEntry.ts +307 -0
- package/src/models/RequestLogPage.ts +92 -0
- package/src/models/ResponseFormatJSONObject.ts +78 -0
- package/src/models/ResponseFormatJSONSchema.ts +95 -0
- package/src/models/ResponseFormatText.ts +78 -0
- package/src/models/SpendingLimit.ts +1 -1
- package/src/models/StreamOptions.ts +1 -1
- package/src/models/Subscription.ts +18 -2
- package/src/models/SubscriptionCheckoutRequest.ts +23 -4
- package/src/models/SubscriptionCheckoutSession.ts +28 -1
- package/src/models/SubscriptionModelUsage.ts +120 -0
- package/src/models/SubscriptionPlan.ts +4 -4
- package/src/models/SubscriptionPortalRequest.ts +1 -1
- package/src/models/SubscriptionPortalSession.ts +1 -1
- package/src/models/SubscriptionPrice.ts +1 -1
- package/src/models/SubscriptionQuota.ts +16 -7
- package/src/models/SubscriptionTier.ts +108 -0
- package/src/models/SubscriptionUpgradeRequest.ts +66 -0
- package/src/models/SubscriptionUsage.ts +47 -6
- package/src/models/Tool.ts +95 -0
- package/src/models/ToolCall.ts +110 -0
- package/src/models/ToolCallFunction.ts +76 -0
- package/src/models/ToolChoiceFunction.ts +95 -0
- package/src/models/ToolChoiceFunctionFunction.ts +66 -0
- package/src/models/ToolFunction.ts +83 -0
- package/src/models/UpdateSpendingLimitRequest.ts +1 -1
- package/src/models/Usage.ts +56 -1
- package/src/models/UsageBucket.ts +49 -6
- package/src/models/UsageCompletionTokensDetails.ts +65 -0
- package/src/models/UsagePage.ts +2 -1
- package/src/models/UsagePromptTokensDetails.ts +66 -0
- package/src/models/VideoCreateRequest.ts +1 -1
- package/src/models/VideoJob.ts +1 -1
- package/src/models/VideoList.ts +1 -1
- package/src/models/WebhookEndpoint.ts +6 -2
- package/src/models/WebhookEndpointPage.ts +1 -1
- package/src/models/index.ts +30 -0
- package/src/runtime.ts +2 -2
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ApiKey } from './ApiKey';
|
|
17
|
+
import {
|
|
18
|
+
ApiKeyFromJSON,
|
|
19
|
+
ApiKeyFromJSONTyped,
|
|
20
|
+
ApiKeyToJSON,
|
|
21
|
+
ApiKeyToJSONTyped,
|
|
22
|
+
} from './ApiKey';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ApiKeyList
|
|
28
|
+
*/
|
|
29
|
+
export interface ApiKeyList {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {Array<ApiKey>}
|
|
33
|
+
* @memberof ApiKeyList
|
|
34
|
+
*/
|
|
35
|
+
data: Array<ApiKey>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ApiKeyList interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfApiKeyList(value: object): value is ApiKeyList {
|
|
42
|
+
if (!('data' in value) || value['data'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function ApiKeyListFromJSON(json: any): ApiKeyList {
|
|
47
|
+
return ApiKeyListFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function ApiKeyListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyList {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'data': ((json['data'] as Array<any>).map(ApiKeyFromJSON)),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ApiKeyListToJSON(json: any): ApiKeyList {
|
|
61
|
+
return ApiKeyListToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ApiKeyListToJSONTyped(value?: ApiKeyList | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'data': ((value['data'] as Array<any>).map(ApiKeyToJSON)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ApiKeyScopes
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiKeyScopes {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {ApiKeyScopesShapeEnum}
|
|
25
|
+
* @memberof ApiKeyScopes
|
|
26
|
+
*/
|
|
27
|
+
shape: ApiKeyScopesShapeEnum;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the key can create, update and revoke keys: true for a `full_access` key and for a granular key granted `{"keys": "write"}`.
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof ApiKeyScopes
|
|
32
|
+
*/
|
|
33
|
+
keysManage: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Per-resource levels, present for a granular key.
|
|
36
|
+
* @type {{ [key: string]: ApiKeyScopesResourcesEnum; }}
|
|
37
|
+
* @memberof ApiKeyScopes
|
|
38
|
+
*/
|
|
39
|
+
resources?: { [key: string]: ApiKeyScopesResourcesEnum; };
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const ApiKeyScopesShapeEnum = {
|
|
47
|
+
FullAccess: 'full_access',
|
|
48
|
+
Standard: 'standard',
|
|
49
|
+
ReadOnly: 'read_only',
|
|
50
|
+
Granular: 'granular'
|
|
51
|
+
} as const;
|
|
52
|
+
export type ApiKeyScopesShapeEnum = typeof ApiKeyScopesShapeEnum[keyof typeof ApiKeyScopesShapeEnum];
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @export
|
|
56
|
+
*/
|
|
57
|
+
export const ApiKeyScopesResourcesEnum = {
|
|
58
|
+
None: 'none',
|
|
59
|
+
Read: 'read',
|
|
60
|
+
Write: 'write'
|
|
61
|
+
} as const;
|
|
62
|
+
export type ApiKeyScopesResourcesEnum = typeof ApiKeyScopesResourcesEnum[keyof typeof ApiKeyScopesResourcesEnum];
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Check if a given object implements the ApiKeyScopes interface.
|
|
67
|
+
*/
|
|
68
|
+
export function instanceOfApiKeyScopes(value: object): value is ApiKeyScopes {
|
|
69
|
+
if (!('shape' in value) || value['shape'] === undefined) return false;
|
|
70
|
+
if ((!('keysManage' in (value as Record<string, any>)) && !('keys_manage' in (value as Record<string, any>))) || ((value as Record<string, any>)['keysManage'] === undefined && (value as Record<string, any>)['keys_manage'] === undefined)) return false;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function ApiKeyScopesFromJSON(json: any): ApiKeyScopes {
|
|
75
|
+
return ApiKeyScopesFromJSONTyped(json, false);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function ApiKeyScopesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyScopes {
|
|
79
|
+
if (json == null) {
|
|
80
|
+
return json;
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
|
|
84
|
+
'shape': json['shape'],
|
|
85
|
+
'keysManage': json['keys_manage'],
|
|
86
|
+
'resources': json['resources'] == null ? undefined : json['resources'],
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function ApiKeyScopesToJSON(json: any): ApiKeyScopes {
|
|
91
|
+
return ApiKeyScopesToJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function ApiKeyScopesToJSONTyped(value?: ApiKeyScopes | null, ignoreDiscriminator: boolean = false): any {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'shape': value['shape'],
|
|
102
|
+
'keys_manage': value['keysManage'],
|
|
103
|
+
'resources': value['resources'],
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Send only the fields to change. `null` clears `budget_cents`, `allowed_models` or `expires_at`. `scopes` cannot be changed.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ApiKeyUpdate
|
|
20
|
+
*/
|
|
21
|
+
export interface ApiKeyUpdate {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ApiKeyUpdate
|
|
26
|
+
*/
|
|
27
|
+
name?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ApiKeyUpdate
|
|
32
|
+
*/
|
|
33
|
+
budgetCents?: number | null;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Array<string>}
|
|
37
|
+
* @memberof ApiKeyUpdate
|
|
38
|
+
*/
|
|
39
|
+
allowedModels?: Array<string> | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof ApiKeyUpdate
|
|
44
|
+
*/
|
|
45
|
+
rateLimitRps?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof ApiKeyUpdate
|
|
50
|
+
*/
|
|
51
|
+
rateLimitBurst?: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {Date}
|
|
55
|
+
* @memberof ApiKeyUpdate
|
|
56
|
+
*/
|
|
57
|
+
expiresAt?: Date | null;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the ApiKeyUpdate interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfApiKeyUpdate(value: object): value is ApiKeyUpdate {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function ApiKeyUpdateFromJSON(json: any): ApiKeyUpdate {
|
|
68
|
+
return ApiKeyUpdateFromJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function ApiKeyUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiKeyUpdate {
|
|
72
|
+
if (json == null) {
|
|
73
|
+
return json;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
|
|
77
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
78
|
+
'budgetCents': json['budget_cents'] === undefined ? undefined : json['budget_cents'] === null ? null : json['budget_cents'],
|
|
79
|
+
'allowedModels': json['allowed_models'] === undefined ? undefined : json['allowed_models'] === null ? null : json['allowed_models'],
|
|
80
|
+
'rateLimitRps': json['rate_limit_rps'] == null ? undefined : json['rate_limit_rps'],
|
|
81
|
+
'rateLimitBurst': json['rate_limit_burst'] == null ? undefined : json['rate_limit_burst'],
|
|
82
|
+
'expiresAt': json['expires_at'] === undefined ? undefined : json['expires_at'] === null ? null : (new Date(json['expires_at'])),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function ApiKeyUpdateToJSON(json: any): ApiKeyUpdate {
|
|
87
|
+
return ApiKeyUpdateToJSONTyped(json, false);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function ApiKeyUpdateToJSONTyped(value?: ApiKeyUpdate | null, ignoreDiscriminator: boolean = false): any {
|
|
91
|
+
if (value == null) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'name': value['name'],
|
|
98
|
+
'budget_cents': value['budgetCents'],
|
|
99
|
+
'allowed_models': value['allowedModels'],
|
|
100
|
+
'rate_limit_rps': value['rateLimitRps'],
|
|
101
|
+
'rate_limit_burst': value['rateLimitBurst'],
|
|
102
|
+
'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
package/src/models/Balance.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* deeprelay Public Developer API
|
|
5
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0.0
|
|
8
8
|
* Contact: support@deeprelay.ai
|
package/src/models/ChatChoice.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* deeprelay Public Developer API
|
|
5
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0.0
|
|
8
8
|
* Contact: support@deeprelay.ai
|
|
@@ -40,11 +40,19 @@ export interface ChatChoice {
|
|
|
40
40
|
*/
|
|
41
41
|
message?: ChatMessage;
|
|
42
42
|
/**
|
|
43
|
+
* tool_calls appears only when the request carried tools and the model made a call, which requires a model that lists "tools" in its supported_parameters.
|
|
43
44
|
*
|
|
44
45
|
* @type {ChatChoiceFinishReasonEnum}
|
|
45
46
|
* @memberof ChatChoice
|
|
46
47
|
*/
|
|
47
48
|
finishReason?: ChatChoiceFinishReasonEnum;
|
|
49
|
+
/**
|
|
50
|
+
* Per-token log probabilities (OpenAI shape, `content` array) when the request set logprobs: true, passed through from the serving upstream. Not comparable across upstreams or numeric precisions.
|
|
51
|
+
*
|
|
52
|
+
* @type {{ [key: string]: any; }}
|
|
53
|
+
* @memberof ChatChoice
|
|
54
|
+
*/
|
|
55
|
+
logprobs?: { [key: string]: any; };
|
|
48
56
|
}
|
|
49
57
|
|
|
50
58
|
|
|
@@ -80,6 +88,7 @@ export function ChatChoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean)
|
|
|
80
88
|
'index': json['index'] == null ? undefined : json['index'],
|
|
81
89
|
'message': json['message'] == null ? undefined : ChatMessageFromJSON(json['message']),
|
|
82
90
|
'finishReason': json['finish_reason'] == null ? undefined : json['finish_reason'],
|
|
91
|
+
'logprobs': json['logprobs'] == null ? undefined : json['logprobs'],
|
|
83
92
|
};
|
|
84
93
|
}
|
|
85
94
|
|
|
@@ -97,6 +106,7 @@ export function ChatChoiceToJSONTyped(value?: ChatChoice | null, ignoreDiscrimin
|
|
|
97
106
|
'index': value['index'],
|
|
98
107
|
'message': ChatMessageToJSON(value['message']),
|
|
99
108
|
'finish_reason': value['finishReason'],
|
|
109
|
+
'logprobs': value['logprobs'],
|
|
100
110
|
};
|
|
101
111
|
}
|
|
102
112
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* deeprelay Public Developer API
|
|
5
|
-
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details.
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
6
|
*
|
|
7
7
|
* The version of the OpenAPI document: 1.0.0
|
|
8
8
|
* Contact: support@deeprelay.ai
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ChatCompletionRequestToolChoice } from './ChatCompletionRequestToolChoice';
|
|
17
|
+
import {
|
|
18
|
+
ChatCompletionRequestToolChoiceFromJSON,
|
|
19
|
+
ChatCompletionRequestToolChoiceFromJSONTyped,
|
|
20
|
+
ChatCompletionRequestToolChoiceToJSON,
|
|
21
|
+
ChatCompletionRequestToolChoiceToJSONTyped,
|
|
22
|
+
} from './ChatCompletionRequestToolChoice';
|
|
16
23
|
import type { ChatMessage } from './ChatMessage';
|
|
17
24
|
import {
|
|
18
25
|
ChatMessageFromJSON,
|
|
@@ -27,6 +34,20 @@ import {
|
|
|
27
34
|
StreamOptionsToJSON,
|
|
28
35
|
StreamOptionsToJSONTyped,
|
|
29
36
|
} from './StreamOptions';
|
|
37
|
+
import type { ChatCompletionRequestResponseFormat } from './ChatCompletionRequestResponseFormat';
|
|
38
|
+
import {
|
|
39
|
+
ChatCompletionRequestResponseFormatFromJSON,
|
|
40
|
+
ChatCompletionRequestResponseFormatFromJSONTyped,
|
|
41
|
+
ChatCompletionRequestResponseFormatToJSON,
|
|
42
|
+
ChatCompletionRequestResponseFormatToJSONTyped,
|
|
43
|
+
} from './ChatCompletionRequestResponseFormat';
|
|
44
|
+
import type { Tool } from './Tool';
|
|
45
|
+
import {
|
|
46
|
+
ToolFromJSON,
|
|
47
|
+
ToolFromJSONTyped,
|
|
48
|
+
ToolToJSON,
|
|
49
|
+
ToolToJSONTyped,
|
|
50
|
+
} from './Tool';
|
|
30
51
|
|
|
31
52
|
/**
|
|
32
53
|
*
|
|
@@ -35,7 +56,7 @@ import {
|
|
|
35
56
|
*/
|
|
36
57
|
export interface ChatCompletionRequest {
|
|
37
58
|
/**
|
|
38
|
-
* Canonical model id, e.g. "deeprelay/
|
|
59
|
+
* Canonical model id, e.g. "deeprelay/llama-3.3-70b-instruct".
|
|
39
60
|
* @type {string}
|
|
40
61
|
* @memberof ChatCompletionRequest
|
|
41
62
|
*/
|
|
@@ -58,6 +79,13 @@ export interface ChatCompletionRequest {
|
|
|
58
79
|
* @memberof ChatCompletionRequest
|
|
59
80
|
*/
|
|
60
81
|
maxTokens?: number;
|
|
82
|
+
/**
|
|
83
|
+
* OpenAI's newer name for max_tokens, accepted for client compatibility. When both are sent, max_tokens wins.
|
|
84
|
+
*
|
|
85
|
+
* @type {number}
|
|
86
|
+
* @memberof ChatCompletionRequest
|
|
87
|
+
*/
|
|
88
|
+
maxCompletionTokens?: number;
|
|
61
89
|
/**
|
|
62
90
|
*
|
|
63
91
|
* @type {boolean}
|
|
@@ -70,6 +98,72 @@ export interface ChatCompletionRequest {
|
|
|
70
98
|
* @memberof ChatCompletionRequest
|
|
71
99
|
*/
|
|
72
100
|
streamOptions?: StreamOptions;
|
|
101
|
+
/**
|
|
102
|
+
* Functions the model may call. Support is per-model — check for "tools" in the model's supported_parameters before sending it. Omit the field entirely rather than sending an empty array.
|
|
103
|
+
*
|
|
104
|
+
* @type {Array<Tool>}
|
|
105
|
+
* @memberof ChatCompletionRequest
|
|
106
|
+
*/
|
|
107
|
+
tools?: Array<Tool>;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @type {ChatCompletionRequestToolChoice}
|
|
111
|
+
* @memberof ChatCompletionRequest
|
|
112
|
+
*/
|
|
113
|
+
toolChoice?: ChatCompletionRequestToolChoice;
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* @type {ChatCompletionRequestResponseFormat}
|
|
117
|
+
* @memberof ChatCompletionRequest
|
|
118
|
+
*/
|
|
119
|
+
responseFormat?: ChatCompletionRequestResponseFormat;
|
|
120
|
+
/**
|
|
121
|
+
* Hint: how much a reasoning model should think. Values in use are none, minimal, low, medium, high and xhigh; which ones a model accepts varies. Forwarded to an upstream that accepts the value, otherwise dropped and reported in x-deeprelay-ignored-params. Never rejected.
|
|
122
|
+
*
|
|
123
|
+
* @type {string}
|
|
124
|
+
* @memberof ChatCompletionRequest
|
|
125
|
+
*/
|
|
126
|
+
reasoningEffort?: string;
|
|
127
|
+
/**
|
|
128
|
+
* Hint. Forwarded when the serving upstream accepts it, otherwise dropped and reported in x-deeprelay-ignored-params.
|
|
129
|
+
* @type {number}
|
|
130
|
+
* @memberof ChatCompletionRequest
|
|
131
|
+
*/
|
|
132
|
+
presencePenalty?: number;
|
|
133
|
+
/**
|
|
134
|
+
* Hint. Forwarded when the serving upstream accepts it, otherwise dropped and reported in x-deeprelay-ignored-params.
|
|
135
|
+
* @type {number}
|
|
136
|
+
* @memberof ChatCompletionRequest
|
|
137
|
+
*/
|
|
138
|
+
frequencyPenalty?: number;
|
|
139
|
+
/**
|
|
140
|
+
* Hint for best-effort determinism. Forwarded when the serving upstream accepts it, otherwise dropped and reported. Identical seeds are not guaranteed to give identical output across upstreams.
|
|
141
|
+
*
|
|
142
|
+
* @type {number}
|
|
143
|
+
* @memberof ChatCompletionRequest
|
|
144
|
+
*/
|
|
145
|
+
seed?: number;
|
|
146
|
+
/**
|
|
147
|
+
* Whether the model may emit several tool calls in one turn. When false and the serving upstream cannot honour it, the relay returns only the first tool call and reports `parallel_tool_calls:enforced` in x-deeprelay-ignored-params.
|
|
148
|
+
*
|
|
149
|
+
* @type {boolean}
|
|
150
|
+
* @memberof ChatCompletionRequest
|
|
151
|
+
*/
|
|
152
|
+
parallelToolCalls?: boolean;
|
|
153
|
+
/**
|
|
154
|
+
* Return per-token log probabilities in choices[].logprobs. Gated per model ("logprobs" in supported_parameters). Values come from the serving upstream and are not comparable across upstreams or numeric precisions.
|
|
155
|
+
*
|
|
156
|
+
* @type {boolean}
|
|
157
|
+
* @memberof ChatCompletionRequest
|
|
158
|
+
*/
|
|
159
|
+
logprobs?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Number of alternatives per token (requires logprobs). Gated per model; each model has its own maximum, and a larger value returns 400 unsupported_parameter.
|
|
162
|
+
*
|
|
163
|
+
* @type {number}
|
|
164
|
+
* @memberof ChatCompletionRequest
|
|
165
|
+
*/
|
|
166
|
+
topLogprobs?: number;
|
|
73
167
|
}
|
|
74
168
|
|
|
75
169
|
/**
|
|
@@ -95,8 +189,19 @@ export function ChatCompletionRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
95
189
|
'messages': ((json['messages'] as Array<any>).map(ChatMessageFromJSON)),
|
|
96
190
|
'temperature': json['temperature'] == null ? undefined : json['temperature'],
|
|
97
191
|
'maxTokens': json['max_tokens'] == null ? undefined : json['max_tokens'],
|
|
192
|
+
'maxCompletionTokens': json['max_completion_tokens'] == null ? undefined : json['max_completion_tokens'],
|
|
98
193
|
'stream': json['stream'] == null ? undefined : json['stream'],
|
|
99
194
|
'streamOptions': json['stream_options'] == null ? undefined : StreamOptionsFromJSON(json['stream_options']),
|
|
195
|
+
'tools': json['tools'] == null ? undefined : ((json['tools'] as Array<any>).map(ToolFromJSON)),
|
|
196
|
+
'toolChoice': json['tool_choice'] == null ? undefined : ChatCompletionRequestToolChoiceFromJSON(json['tool_choice']),
|
|
197
|
+
'responseFormat': json['response_format'] == null ? undefined : ChatCompletionRequestResponseFormatFromJSON(json['response_format']),
|
|
198
|
+
'reasoningEffort': json['reasoning_effort'] == null ? undefined : json['reasoning_effort'],
|
|
199
|
+
'presencePenalty': json['presence_penalty'] == null ? undefined : json['presence_penalty'],
|
|
200
|
+
'frequencyPenalty': json['frequency_penalty'] == null ? undefined : json['frequency_penalty'],
|
|
201
|
+
'seed': json['seed'] == null ? undefined : json['seed'],
|
|
202
|
+
'parallelToolCalls': json['parallel_tool_calls'] == null ? undefined : json['parallel_tool_calls'],
|
|
203
|
+
'logprobs': json['logprobs'] == null ? undefined : json['logprobs'],
|
|
204
|
+
'topLogprobs': json['top_logprobs'] == null ? undefined : json['top_logprobs'],
|
|
100
205
|
};
|
|
101
206
|
}
|
|
102
207
|
|
|
@@ -115,8 +220,19 @@ export function ChatCompletionRequestToJSONTyped(value?: ChatCompletionRequest |
|
|
|
115
220
|
'messages': ((value['messages'] as Array<any>).map(ChatMessageToJSON)),
|
|
116
221
|
'temperature': value['temperature'],
|
|
117
222
|
'max_tokens': value['maxTokens'],
|
|
223
|
+
'max_completion_tokens': value['maxCompletionTokens'],
|
|
118
224
|
'stream': value['stream'],
|
|
119
225
|
'stream_options': StreamOptionsToJSON(value['streamOptions']),
|
|
226
|
+
'tools': value['tools'] == null ? undefined : ((value['tools'] as Array<any>).map(ToolToJSON)),
|
|
227
|
+
'tool_choice': ChatCompletionRequestToolChoiceToJSON(value['toolChoice']),
|
|
228
|
+
'response_format': ChatCompletionRequestResponseFormatToJSON(value['responseFormat']),
|
|
229
|
+
'reasoning_effort': value['reasoningEffort'],
|
|
230
|
+
'presence_penalty': value['presencePenalty'],
|
|
231
|
+
'frequency_penalty': value['frequencyPenalty'],
|
|
232
|
+
'seed': value['seed'],
|
|
233
|
+
'parallel_tool_calls': value['parallelToolCalls'],
|
|
234
|
+
'logprobs': value['logprobs'],
|
|
235
|
+
'top_logprobs': value['topLogprobs'],
|
|
120
236
|
};
|
|
121
237
|
}
|
|
122
238
|
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { ResponseFormatJSONObject } from './ResponseFormatJSONObject';
|
|
16
|
+
import {
|
|
17
|
+
instanceOfResponseFormatJSONObject,
|
|
18
|
+
ResponseFormatJSONObjectFromJSON,
|
|
19
|
+
ResponseFormatJSONObjectFromJSONTyped,
|
|
20
|
+
ResponseFormatJSONObjectToJSON,
|
|
21
|
+
} from './ResponseFormatJSONObject';
|
|
22
|
+
import type { ResponseFormatJSONSchema } from './ResponseFormatJSONSchema';
|
|
23
|
+
import {
|
|
24
|
+
instanceOfResponseFormatJSONSchema,
|
|
25
|
+
ResponseFormatJSONSchemaFromJSON,
|
|
26
|
+
ResponseFormatJSONSchemaFromJSONTyped,
|
|
27
|
+
ResponseFormatJSONSchemaToJSON,
|
|
28
|
+
} from './ResponseFormatJSONSchema';
|
|
29
|
+
import type { ResponseFormatText } from './ResponseFormatText';
|
|
30
|
+
import {
|
|
31
|
+
instanceOfResponseFormatText,
|
|
32
|
+
ResponseFormatTextFromJSON,
|
|
33
|
+
ResponseFormatTextFromJSONTyped,
|
|
34
|
+
ResponseFormatTextToJSON,
|
|
35
|
+
} from './ResponseFormatText';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @type ChatCompletionRequestResponseFormat
|
|
39
|
+
* Constrain the reply format. Gated per model: `json_object` needs "response_format" in the model's supported_parameters, and a strict `json_schema` needs "structured_outputs". A model without the capability returns 400 unsupported_parameter naming the models that have it. A non-strict json_schema on a model with only "response_format" is served as json_object and reported as `response_format:downgraded` in x-deeprelay-ignored-params. The relay never emulates JSON mode by prompting.
|
|
40
|
+
*
|
|
41
|
+
* @export
|
|
42
|
+
*/
|
|
43
|
+
export type ChatCompletionRequestResponseFormat = { type: 'json_object' } & ResponseFormatJSONObject | { type: 'json_schema' } & ResponseFormatJSONSchema | { type: 'text' } & ResponseFormatText;
|
|
44
|
+
|
|
45
|
+
export function ChatCompletionRequestResponseFormatFromJSON(json: any): ChatCompletionRequestResponseFormat {
|
|
46
|
+
return ChatCompletionRequestResponseFormatFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ChatCompletionRequestResponseFormatFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatCompletionRequestResponseFormat {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
switch (json['type']) {
|
|
54
|
+
case 'json_object':
|
|
55
|
+
return Object.assign({}, ResponseFormatJSONObjectFromJSONTyped(json, true), { type: 'json_object' } as const);
|
|
56
|
+
case 'json_schema':
|
|
57
|
+
return Object.assign({}, ResponseFormatJSONSchemaFromJSONTyped(json, true), { type: 'json_schema' } as const);
|
|
58
|
+
case 'text':
|
|
59
|
+
return Object.assign({}, ResponseFormatTextFromJSONTyped(json, true), { type: 'text' } as const);
|
|
60
|
+
default:
|
|
61
|
+
return json;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ChatCompletionRequestResponseFormatToJSON(json: any): any {
|
|
66
|
+
return ChatCompletionRequestResponseFormatToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ChatCompletionRequestResponseFormatToJSONTyped(value?: ChatCompletionRequestResponseFormat | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
switch (value['type']) {
|
|
74
|
+
case 'json_object':
|
|
75
|
+
return Object.assign({}, ResponseFormatJSONObjectToJSON(value), { 'type': 'json_object' } as const);
|
|
76
|
+
case 'json_schema':
|
|
77
|
+
return Object.assign({}, ResponseFormatJSONSchemaToJSON(value), { 'type': 'json_schema' } as const);
|
|
78
|
+
case 'text':
|
|
79
|
+
return Object.assign({}, ResponseFormatTextToJSON(value), { 'type': 'text' } as const);
|
|
80
|
+
default:
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* deeprelay Public Developer API
|
|
5
|
+
* Programmatic API for deeprelay. Authenticate with API keys minted from the dashboard. See https://deeprelay.ai/docs for details. Keys minted from the dashboard or `deeprelay login` belong to the Production server, https://api.deeprelay.ai/v1. The Demo server is an internal staging environment with its own key store. Versioning: `/v1` is the API version. `info.version` is the revision of this `/v1` document, not a separate API. OpenAI compatibility: chat completions follow the OpenAI request and response shapes, but not every OpenAI parameter is carried. Some are rejected with 400 `unsupported_parameter` and any parameter not declared in this spec is accepted and ignored. The full table is at https://deeprelay.ai/docs/api/inference#openai-compatibility.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@deeprelay.ai
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { ToolChoiceFunction } from './ToolChoiceFunction';
|
|
16
|
+
import {
|
|
17
|
+
instanceOfToolChoiceFunction,
|
|
18
|
+
ToolChoiceFunctionFromJSON,
|
|
19
|
+
ToolChoiceFunctionFromJSONTyped,
|
|
20
|
+
ToolChoiceFunctionToJSON,
|
|
21
|
+
} from './ToolChoiceFunction';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @type ChatCompletionRequestToolChoice
|
|
25
|
+
* How the model should pick a tool: the strings "none", "auto" or "required", or an object naming one function. Requires a non-empty tools array unless it is "none".
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
*/
|
|
29
|
+
export type ChatCompletionRequestToolChoice = ToolChoiceFunction | string;
|
|
30
|
+
|
|
31
|
+
export function ChatCompletionRequestToolChoiceFromJSON(json: any): ChatCompletionRequestToolChoice {
|
|
32
|
+
return ChatCompletionRequestToolChoiceFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function ChatCompletionRequestToolChoiceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChatCompletionRequestToolChoice {
|
|
36
|
+
if (json == null) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
if (typeof json !== 'object') {
|
|
40
|
+
return json;
|
|
41
|
+
}
|
|
42
|
+
if (instanceOfToolChoiceFunction(json)) {
|
|
43
|
+
return ToolChoiceFunctionFromJSONTyped(json, true);
|
|
44
|
+
}
|
|
45
|
+
if (typeof json === 'string' && (json === 'none' || json === 'auto' || json === 'required')) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {} as any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function ChatCompletionRequestToolChoiceToJSON(json: any): any {
|
|
52
|
+
return ChatCompletionRequestToolChoiceToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function ChatCompletionRequestToolChoiceToJSONTyped(value?: ChatCompletionRequestToolChoice | null, ignoreDiscriminator: boolean = false): any {
|
|
56
|
+
if (value == null) {
|
|
57
|
+
return value;
|
|
58
|
+
}
|
|
59
|
+
if (typeof value !== 'object') {
|
|
60
|
+
return value;
|
|
61
|
+
}
|
|
62
|
+
if (instanceOfToolChoiceFunction(value)) {
|
|
63
|
+
return ToolChoiceFunctionToJSON(value as ToolChoiceFunction);
|
|
64
|
+
}
|
|
65
|
+
if (typeof value === 'string' && (value === 'none' || value === 'auto' || value === 'required')) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
return {};
|
|
69
|
+
}
|
|
70
|
+
|