@effect/ai-openai 0.11.0 → 0.11.2
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/OpenAiEmbeddings/package.json +6 -0
- package/OpenAiTelemetry/package.json +6 -0
- package/dist/cjs/Generated.js +1910 -316
- package/dist/cjs/Generated.js.map +1 -1
- package/dist/cjs/OpenAiClient.js +88 -60
- package/dist/cjs/OpenAiClient.js.map +1 -1
- package/dist/cjs/OpenAiCompletions.js +82 -6
- package/dist/cjs/OpenAiCompletions.js.map +1 -1
- package/dist/cjs/OpenAiEmbeddings.js +95 -0
- package/dist/cjs/OpenAiEmbeddings.js.map +1 -0
- package/dist/cjs/OpenAiTelemetry.js +39 -0
- package/dist/cjs/OpenAiTelemetry.js.map +1 -0
- package/dist/cjs/index.js +5 -1
- package/dist/dts/Generated.d.ts +2789 -517
- package/dist/dts/Generated.d.ts.map +1 -1
- package/dist/dts/OpenAiClient.d.ts +15 -1
- package/dist/dts/OpenAiClient.d.ts.map +1 -1
- package/dist/dts/OpenAiCompletions.d.ts +8 -2
- package/dist/dts/OpenAiCompletions.d.ts.map +1 -1
- package/dist/dts/OpenAiConfig.d.ts +12 -1
- package/dist/dts/OpenAiConfig.d.ts.map +1 -1
- package/dist/dts/OpenAiEmbeddings.d.ts +51 -0
- package/dist/dts/OpenAiEmbeddings.d.ts.map +1 -0
- package/dist/dts/OpenAiTelemetry.d.ts +107 -0
- package/dist/dts/OpenAiTelemetry.d.ts.map +1 -0
- package/dist/dts/index.d.ts +8 -0
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/esm/Generated.js +1612 -311
- package/dist/esm/Generated.js.map +1 -1
- package/dist/esm/OpenAiClient.js +88 -60
- package/dist/esm/OpenAiClient.js.map +1 -1
- package/dist/esm/OpenAiCompletions.js +82 -6
- package/dist/esm/OpenAiCompletions.js.map +1 -1
- package/dist/esm/OpenAiEmbeddings.js +83 -0
- package/dist/esm/OpenAiEmbeddings.js.map +1 -0
- package/dist/esm/OpenAiTelemetry.js +30 -0
- package/dist/esm/OpenAiTelemetry.js.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +22 -6
- package/src/Generated.ts +1892 -398
- package/src/OpenAiClient.ts +118 -67
- package/src/OpenAiCompletions.ts +108 -14
- package/src/OpenAiEmbeddings.ts +149 -0
- package/src/OpenAiTelemetry.ts +159 -0
- package/src/index.ts +10 -0
package/dist/cjs/Generated.js
CHANGED
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
6
|
+
exports.CreateCompletionRequestModel = exports.CreateCompletionRequest = exports.CreateChatCompletionResponseServiceTier = exports.CreateChatCompletionResponseObject = exports.CreateChatCompletionResponseChoicesFinishReason = exports.CreateChatCompletionResponse = exports.CreateChatCompletionRequestServiceTier = exports.CreateChatCompletionRequestReasoningEffort = exports.CreateChatCompletionRequestModel = exports.CreateChatCompletionRequestFunctionCall = exports.CreateChatCompletionRequestAudioVoice = exports.CreateChatCompletionRequestAudioFormat = exports.CreateChatCompletionRequest = exports.CreateBatchRequestEndpoint = exports.CreateBatchRequestCompletionWindow = exports.CreateBatchRequest = exports.CreateAssistantRequestToolResourcesFileSearchVectorStoresChunkingStrategyType = exports.CreateAssistantRequestModel = exports.CreateAssistantRequest = exports.CostsResultObject = exports.CostsResult = exports.CompletionUsage = exports.CompleteUploadRequest = exports.ChunkingStrategyRequestParam = exports.ChatCompletionToolType = exports.ChatCompletionToolChoiceOption = exports.ChatCompletionTool = exports.ChatCompletionTokenLogprob = exports.ChatCompletionStreamOptions = exports.ChatCompletionResponseMessageRole = exports.ChatCompletionResponseMessage = exports.ChatCompletionRequestUserMessageRole = exports.ChatCompletionRequestUserMessageContentPart = exports.ChatCompletionRequestUserMessage = exports.ChatCompletionRequestToolMessageRole = exports.ChatCompletionRequestToolMessageContentPart = exports.ChatCompletionRequestToolMessage = exports.ChatCompletionRequestSystemMessageRole = exports.ChatCompletionRequestSystemMessageContentPart = exports.ChatCompletionRequestSystemMessage = exports.ChatCompletionRequestMessageContentPartTextType = exports.ChatCompletionRequestMessageContentPartText = exports.ChatCompletionRequestMessageContentPartRefusalType = exports.ChatCompletionRequestMessageContentPartRefusal = exports.ChatCompletionRequestMessageContentPartImageType = exports.ChatCompletionRequestMessageContentPartImageImageUrlDetail = exports.ChatCompletionRequestMessageContentPartImage = exports.ChatCompletionRequestMessageContentPartAudioType = exports.ChatCompletionRequestMessageContentPartAudioInputAudioFormat = exports.ChatCompletionRequestMessageContentPartAudio = exports.ChatCompletionRequestMessage = exports.ChatCompletionRequestFunctionMessageRole = exports.ChatCompletionRequestFunctionMessage = exports.ChatCompletionRequestDeveloperMessageRole = exports.ChatCompletionRequestDeveloperMessage = exports.ChatCompletionRequestAssistantMessageRole = exports.ChatCompletionRequestAssistantMessageContentPart = exports.ChatCompletionRequestAssistantMessage = exports.ChatCompletionNamedToolChoiceType = exports.ChatCompletionNamedToolChoice = exports.ChatCompletionModalities = exports.ChatCompletionMessageToolCalls = exports.ChatCompletionMessageToolCallType = exports.ChatCompletionMessageToolCall = exports.ChatCompletionFunctions = exports.ChatCompletionFunctionCallOption = exports.BatchStatus = exports.BatchObject = exports.Batch = exports.AutoChunkingStrategyRequestParamType = exports.AutoChunkingStrategyRequestParam = exports.AuditLogEventType = exports.AuditLogActorUser = exports.AuditLogActorType = exports.AuditLogActorSession = exports.AuditLogActorServiceAccount = exports.AuditLogActorApiKeyType = exports.AuditLogActorApiKey = exports.AuditLogActor = exports.AuditLog = exports.AssistantsNamedToolChoiceType = exports.AssistantsNamedToolChoice = exports.AssistantsApiToolChoiceOption = exports.AssistantsApiResponseFormatOption = exports.AssistantToolsFunctionType = exports.AssistantToolsFunction = exports.AssistantToolsFileSearchTypeOnlyType = exports.AssistantToolsFileSearchTypeOnly = exports.AssistantToolsFileSearchType = exports.AssistantToolsFileSearch = exports.AssistantToolsCodeType = exports.AssistantToolsCode = exports.AssistantObjectObject = exports.AssistantObject = exports.ApiKeyList = exports.AdminApiKeysListParamsOrder = exports.AdminApiKeysListParams = exports.AdminApiKeysDelete200 = exports.AdminApiKeysCreateRequest = exports.AdminApiKey = void 0;
|
|
7
|
+
exports.FineTuningJobEventLevel = exports.FineTuningJobEvent = exports.FineTuningJobCheckpointObject = exports.FineTuningJobCheckpoint = exports.FineTuningJob = exports.FineTuningIntegrationType = exports.FineTuningIntegration = exports.FineTuneSupervisedMethodHyperparametersNEpochs = exports.FineTuneSupervisedMethodHyperparametersLearningRateMultiplier = exports.FineTuneSupervisedMethodHyperparametersBatchSize = exports.FineTuneSupervisedMethod = exports.FineTuneMethodType = exports.FineTuneMethod = exports.FineTuneDPOMethodHyperparametersNEpochs = exports.FineTuneDPOMethodHyperparametersLearningRateMultiplier = exports.FineTuneDPOMethodHyperparametersBeta = exports.FineTuneDPOMethodHyperparametersBatchSize = exports.FineTuneDPOMethod = exports.FileSearchRankingOptionsRanker = exports.FileSearchRankingOptions = exports.ErrorResponse = exports.Error = exports.EmbeddingObject = exports.Embedding = exports.DownloadFile200 = exports.DeleteVectorStoreResponseObject = exports.DeleteVectorStoreResponse = exports.DeleteVectorStoreFileResponseObject = exports.DeleteVectorStoreFileResponse = exports.DeleteThreadResponseObject = exports.DeleteThreadResponse = exports.DeleteModelResponse = exports.DeleteMessageResponseObject = exports.DeleteMessageResponse = exports.DeleteFileResponseObject = exports.DeleteFileResponse = exports.DeleteAssistantResponseObject = exports.DeleteAssistantResponse = exports.CreateVectorStoreRequest = exports.CreateVectorStoreFileRequest = exports.CreateVectorStoreFileBatchRequest = exports.CreateUploadRequestPurpose = exports.CreateUploadRequest = exports.CreateTranslationResponseVerboseJson = exports.CreateTranslationResponseJson = exports.CreateTranslation200 = exports.CreateTranscriptionResponseVerboseJson = exports.CreateTranscriptionResponseJson = exports.CreateTranscription200 = exports.CreateThreadRequestToolResourcesFileSearchVectorStoresChunkingStrategyType = exports.CreateThreadRequest = exports.CreateThreadAndRunRequestModel = exports.CreateThreadAndRunRequest = exports.CreateSpeechRequestVoice = exports.CreateSpeechRequestResponseFormat = exports.CreateSpeechRequestModel = exports.CreateSpeechRequest = exports.CreateRunRequestModel = exports.CreateRunRequest = exports.CreateRunParamsInclude = exports.CreateRunParams = exports.CreateModerationResponseResultsCategoryAppliedInputTypesViolenceGraphic = exports.CreateModerationResponseResultsCategoryAppliedInputTypesViolence = exports.CreateModerationResponseResultsCategoryAppliedInputTypesSexualMinors = exports.CreateModerationResponseResultsCategoryAppliedInputTypesSexual = exports.CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmIntent = exports.CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmInstructions = exports.CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarm = exports.CreateModerationResponseResultsCategoryAppliedInputTypesIllicitViolent = exports.CreateModerationResponseResultsCategoryAppliedInputTypesIllicit = exports.CreateModerationResponseResultsCategoryAppliedInputTypesHateThreatening = exports.CreateModerationResponseResultsCategoryAppliedInputTypesHate = exports.CreateModerationResponseResultsCategoryAppliedInputTypesHarassmentThreatening = exports.CreateModerationResponseResultsCategoryAppliedInputTypesHarassment = exports.CreateModerationResponse = exports.CreateModerationRequestModel = exports.CreateModerationRequestInputType = exports.CreateModerationRequest = exports.CreateMessageRequestRole = exports.CreateMessageRequest = exports.CreateImageRequestStyle = exports.CreateImageRequestSize = exports.CreateImageRequestResponseFormat = exports.CreateImageRequestQuality = exports.CreateImageRequestModel = exports.CreateImageRequest = exports.CreateFineTuningJobRequestModel = exports.CreateFineTuningJobRequestIntegrationsType = exports.CreateFineTuningJobRequestHyperparametersNEpochs = exports.CreateFineTuningJobRequestHyperparametersLearningRateMultiplier = exports.CreateFineTuningJobRequestHyperparametersBatchSize = exports.CreateFineTuningJobRequest = exports.CreateEmbeddingResponseObject = exports.CreateEmbeddingResponse = exports.CreateEmbeddingRequestModel = exports.CreateEmbeddingRequestEncodingFormat = exports.CreateEmbeddingRequest = exports.CreateCompletionResponseObject = exports.CreateCompletionResponseChoicesFinishReason = exports.CreateCompletionResponse = void 0;
|
|
8
|
+
exports.ModifyMessageRequest = exports.ModifyAssistantRequest = exports.ModelObject = exports.Model = exports.MessageRequestContentTextObjectType = exports.MessageRequestContentTextObject = exports.MessageObjectStatus = exports.MessageObjectRole = exports.MessageObjectObject = exports.MessageObjectIncompleteDetailsReason = exports.MessageObject = exports.MessageContentTextObjectType = exports.MessageContentTextObject = exports.MessageContentTextAnnotationsFilePathObjectType = exports.MessageContentTextAnnotationsFilePathObject = exports.MessageContentTextAnnotationsFileCitationObjectType = exports.MessageContentTextAnnotationsFileCitationObject = exports.MessageContentRefusalObjectType = exports.MessageContentRefusalObject = exports.MessageContentImageUrlObjectType = exports.MessageContentImageUrlObjectImageUrlDetail = exports.MessageContentImageUrlObject = exports.MessageContentImageFileObjectType = exports.MessageContentImageFileObjectImageFileDetail = exports.MessageContentImageFileObject = exports.ListVectorStoresResponse = exports.ListVectorStoresParamsOrder = exports.ListVectorStoresParams = exports.ListVectorStoreFilesResponse = exports.ListVectorStoreFilesParamsOrder = exports.ListVectorStoreFilesParamsFilter = exports.ListVectorStoreFilesParams = exports.ListUsersParams = exports.ListRunsResponse = exports.ListRunsParamsOrder = exports.ListRunsParams = exports.ListRunStepsResponse = exports.ListRunStepsParamsOrder = exports.ListRunStepsParamsInclude = exports.ListRunStepsParams = exports.ListProjectsParams = exports.ListProjectUsersParams = exports.ListProjectServiceAccountsParams = exports.ListProjectRateLimitsParams = exports.ListProjectApiKeysParams = exports.ListPaginatedFineTuningJobsResponseObject = exports.ListPaginatedFineTuningJobsResponse = exports.ListPaginatedFineTuningJobsParams = exports.ListModelsResponseObject = exports.ListModelsResponse = exports.ListMessagesResponse = exports.ListMessagesParamsOrder = exports.ListMessagesParams = exports.ListInvitesParams = exports.ListFineTuningJobEventsResponseObject = exports.ListFineTuningJobEventsResponse = exports.ListFineTuningJobCheckpointsResponseObject = exports.ListFineTuningJobCheckpointsResponse = exports.ListFineTuningJobCheckpointsParams = exports.ListFineTuningEventsParams = exports.ListFilesResponse = exports.ListFilesParamsOrder = exports.ListFilesParams = exports.ListFilesInVectorStoreBatchParamsOrder = exports.ListFilesInVectorStoreBatchParamsFilter = exports.ListFilesInVectorStoreBatchParams = exports.ListBatchesResponseObject = exports.ListBatchesResponse = exports.ListBatchesParams = exports.ListAuditLogsResponseObject = exports.ListAuditLogsResponse = exports.ListAuditLogsParams = exports.ListAssistantsResponse = exports.ListAssistantsParamsOrder = exports.ListAssistantsParams = exports.InviteStatus = exports.InviteRole = exports.InviteRequestRole = exports.InviteRequestProjectsRole = exports.InviteRequest = exports.InviteProjectsRole = exports.InviteObject = exports.InviteListResponseObject = exports.InviteListResponse = exports.InviteDeleteResponseObject = exports.InviteDeleteResponse = exports.Invite = exports.ImagesResponse = exports.Image = exports.GetRunStepParamsInclude = exports.GetRunStepParams = exports.FunctionParameters = exports.FunctionObject = exports.FineTuningJobStatus = exports.FineTuningJobObject = exports.FineTuningJobHyperparametersNEpochs = exports.FineTuningJobHyperparametersLearningRateMultiplier = exports.FineTuningJobHyperparametersBatchSize = exports.FineTuningJobEventType = exports.FineTuningJobEventObject = void 0;
|
|
9
|
+
exports.RunStepObjectObject = exports.RunStepObjectLastErrorCode = exports.RunStepObject = exports.RunStepDetailsToolCallsObjectType = exports.RunStepDetailsToolCallsObject = exports.RunStepDetailsToolCallsFunctionObjectType = exports.RunStepDetailsToolCallsFunctionObject = exports.RunStepDetailsToolCallsFileSearchResultObjectContentType = exports.RunStepDetailsToolCallsFileSearchResultObject = exports.RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker = exports.RunStepDetailsToolCallsFileSearchRankingOptionsObject = exports.RunStepDetailsToolCallsFileSearchObjectType = exports.RunStepDetailsToolCallsFileSearchObject = exports.RunStepDetailsToolCallsCodeOutputLogsObjectType = exports.RunStepDetailsToolCallsCodeOutputLogsObject = exports.RunStepDetailsToolCallsCodeOutputImageObjectType = exports.RunStepDetailsToolCallsCodeOutputImageObject = exports.RunStepDetailsToolCallsCodeObjectType = exports.RunStepDetailsToolCallsCodeObject = exports.RunStepDetailsMessageCreationObjectType = exports.RunStepDetailsMessageCreationObject = exports.RunStepCompletionUsage = exports.RunObjectStatus = exports.RunObjectRequiredActionType = exports.RunObjectObject = exports.RunObjectLastErrorCode = exports.RunObjectIncompleteDetailsReason = exports.RunObject = exports.RunCompletionUsage = exports.ResponseFormatTextType = exports.ResponseFormatText = exports.ResponseFormatJsonSchemaType = exports.ResponseFormatJsonSchemaSchema = exports.ResponseFormatJsonSchema = exports.ResponseFormatJsonObjectType = exports.ResponseFormatJsonObject = exports.RealtimeSessionCreateResponseVoice = exports.RealtimeSessionCreateResponseToolsType = exports.RealtimeSessionCreateResponseMaxResponseOutputTokens = exports.RealtimeSessionCreateResponse = exports.RealtimeSessionCreateRequestVoice = exports.RealtimeSessionCreateRequestToolsType = exports.RealtimeSessionCreateRequestOutputAudioFormat = exports.RealtimeSessionCreateRequestModel = exports.RealtimeSessionCreateRequestMaxResponseOutputTokens = exports.RealtimeSessionCreateRequestInputAudioFormat = exports.RealtimeSessionCreateRequest = exports.ProjectUserUpdateRequestRole = exports.ProjectUserUpdateRequest = exports.ProjectUserRole = exports.ProjectUserObject = exports.ProjectUserListResponse = exports.ProjectUserDeleteResponseObject = exports.ProjectUserDeleteResponse = exports.ProjectUserCreateRequestRole = exports.ProjectUserCreateRequest = exports.ProjectUser = exports.ProjectUpdateRequest = exports.ProjectStatus = exports.ProjectServiceAccountRole = exports.ProjectServiceAccountObject = exports.ProjectServiceAccountListResponseObject = exports.ProjectServiceAccountListResponse = exports.ProjectServiceAccountDeleteResponseObject = exports.ProjectServiceAccountDeleteResponse = exports.ProjectServiceAccountCreateResponseRole = exports.ProjectServiceAccountCreateResponseObject = exports.ProjectServiceAccountCreateResponse = exports.ProjectServiceAccountCreateRequest = exports.ProjectServiceAccountApiKeyObject = exports.ProjectServiceAccountApiKey = exports.ProjectServiceAccount = exports.ProjectRateLimitUpdateRequest = exports.ProjectRateLimitObject = exports.ProjectRateLimitListResponseObject = exports.ProjectRateLimitListResponse = exports.ProjectRateLimit = exports.ProjectObject = exports.ProjectListResponseObject = exports.ProjectListResponse = exports.ProjectCreateRequest = exports.ProjectApiKeyOwnerType = exports.ProjectApiKeyObject = exports.ProjectApiKeyListResponseObject = exports.ProjectApiKeyListResponse = exports.ProjectApiKeyDeleteResponseObject = exports.ProjectApiKeyDeleteResponse = exports.ProjectApiKey = exports.Project = exports.PredictionContentType = exports.PredictionContent = exports.ParallelToolCalls = exports.OtherChunkingStrategyResponseParamType = exports.OtherChunkingStrategyResponseParam = exports.OpenAIFileStatus = exports.OpenAIFilePurpose = exports.OpenAIFileObject = exports.OpenAIFile = exports.ModifyThreadRequest = exports.ModifyRunRequest = void 0;
|
|
10
|
+
exports.make = exports.VectorStoreObjectStatus = exports.VectorStoreObjectObject = exports.VectorStoreObject = exports.VectorStoreFileObjectStatus = exports.VectorStoreFileObjectObject = exports.VectorStoreFileObjectLastErrorCode = exports.VectorStoreFileObject = exports.VectorStoreFileBatchObjectStatus = exports.VectorStoreFileBatchObjectObject = exports.VectorStoreFileBatchObject = exports.VectorStoreExpirationAfterAnchor = exports.VectorStoreExpirationAfter = exports.UserRoleUpdateRequestRole = exports.UserRoleUpdateRequest = exports.UserRole = exports.UserObject = exports.UserListResponseObject = exports.UserListResponse = exports.UserDeleteResponseObject = exports.UserDeleteResponse = exports.User = exports.UsageVectorStoresResultObject = exports.UsageVectorStoresResult = exports.UsageVectorStoresParamsGroupBy = exports.UsageVectorStoresParamsBucketWidth = exports.UsageVectorStoresParams = exports.UsageTimeBucketObject = exports.UsageTimeBucket = exports.UsageResponseObject = exports.UsageResponse = exports.UsageModerationsResultObject = exports.UsageModerationsResult = exports.UsageModerationsParamsGroupBy = exports.UsageModerationsParamsBucketWidth = exports.UsageModerationsParams = exports.UsageImagesResultObject = exports.UsageImagesResult = exports.UsageImagesParamsSources = exports.UsageImagesParamsSizes = exports.UsageImagesParamsGroupBy = exports.UsageImagesParamsBucketWidth = exports.UsageImagesParams = exports.UsageEmbeddingsResultObject = exports.UsageEmbeddingsResult = exports.UsageEmbeddingsParamsGroupBy = exports.UsageEmbeddingsParamsBucketWidth = exports.UsageEmbeddingsParams = exports.UsageCostsParamsGroupBy = exports.UsageCostsParamsBucketWidth = exports.UsageCostsParams = exports.UsageCompletionsResultObject = exports.UsageCompletionsResult = exports.UsageCompletionsParamsGroupBy = exports.UsageCompletionsParamsBucketWidth = exports.UsageCompletionsParams = exports.UsageCodeInterpreterSessionsResultObject = exports.UsageCodeInterpreterSessionsResult = exports.UsageCodeInterpreterSessionsParamsGroupBy = exports.UsageCodeInterpreterSessionsParamsBucketWidth = exports.UsageCodeInterpreterSessionsParams = exports.UsageAudioTranscriptionsResultObject = exports.UsageAudioTranscriptionsResult = exports.UsageAudioTranscriptionsParamsGroupBy = exports.UsageAudioTranscriptionsParamsBucketWidth = exports.UsageAudioTranscriptionsParams = exports.UsageAudioSpeechesResultObject = exports.UsageAudioSpeechesResult = exports.UsageAudioSpeechesParamsGroupBy = exports.UsageAudioSpeechesParamsBucketWidth = exports.UsageAudioSpeechesParams = exports.UploadStatus = exports.UploadPartObject = exports.UploadPart = exports.UploadObject = exports.Upload = exports.UpdateVectorStoreRequest = exports.TruncationObjectType = exports.TruncationObject = exports.TranscriptionWord = exports.TranscriptionSegment = exports.ThreadObjectObject = exports.ThreadObject = exports.SubmitToolOutputsRunRequest = exports.StaticChunkingStrategyResponseParamType = exports.StaticChunkingStrategyResponseParam = exports.StaticChunkingStrategyRequestParamType = exports.StaticChunkingStrategyRequestParam = exports.StaticChunkingStrategy = exports.RunToolCallObjectType = exports.RunToolCallObject = exports.RunStepObjectType = exports.RunStepObjectStatus = void 0;
|
|
9
11
|
var HttpClientError = _interopRequireWildcard(require("@effect/platform/HttpClientError"));
|
|
10
12
|
var HttpClientRequest = _interopRequireWildcard(require("@effect/platform/HttpClientRequest"));
|
|
11
13
|
var HttpClientResponse = _interopRequireWildcard(require("@effect/platform/HttpClientResponse"));
|
|
@@ -13,12 +15,14 @@ var Effect = _interopRequireWildcard(require("effect/Effect"));
|
|
|
13
15
|
var S = _interopRequireWildcard(require("effect/Schema"));
|
|
14
16
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
17
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
class ListAssistantsParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
19
|
+
exports.ListAssistantsParamsOrder = ListAssistantsParamsOrder;
|
|
16
20
|
class ListAssistantsParams extends /*#__PURE__*/S.Struct({
|
|
17
21
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
18
22
|
nullable: true,
|
|
19
23
|
default: () => 20
|
|
20
24
|
}),
|
|
21
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
25
|
+
"order": /*#__PURE__*/S.optionalWith(ListAssistantsParamsOrder, {
|
|
22
26
|
nullable: true,
|
|
23
27
|
default: () => "desc"
|
|
24
28
|
}),
|
|
@@ -30,19 +34,27 @@ class ListAssistantsParams extends /*#__PURE__*/S.Struct({
|
|
|
30
34
|
})
|
|
31
35
|
}) {}
|
|
32
36
|
exports.ListAssistantsParams = ListAssistantsParams;
|
|
37
|
+
class AssistantObjectObject extends /*#__PURE__*/S.Literal("assistant") {}
|
|
38
|
+
exports.AssistantObjectObject = AssistantObjectObject;
|
|
39
|
+
class AssistantToolsCodeType extends /*#__PURE__*/S.Literal("code_interpreter") {}
|
|
40
|
+
exports.AssistantToolsCodeType = AssistantToolsCodeType;
|
|
33
41
|
class AssistantToolsCode extends /*#__PURE__*/S.Struct({
|
|
34
|
-
"type":
|
|
42
|
+
"type": AssistantToolsCodeType
|
|
35
43
|
}) {}
|
|
36
44
|
exports.AssistantToolsCode = AssistantToolsCode;
|
|
45
|
+
class AssistantToolsFileSearchType extends /*#__PURE__*/S.Literal("file_search") {}
|
|
46
|
+
exports.AssistantToolsFileSearchType = AssistantToolsFileSearchType;
|
|
47
|
+
class FileSearchRankingOptionsRanker extends /*#__PURE__*/S.Literal("auto", "default_2024_08_21") {}
|
|
48
|
+
exports.FileSearchRankingOptionsRanker = FileSearchRankingOptionsRanker;
|
|
37
49
|
class FileSearchRankingOptions extends /*#__PURE__*/S.Struct({
|
|
38
|
-
"ranker": /*#__PURE__*/S.optionalWith(
|
|
50
|
+
"ranker": /*#__PURE__*/S.optionalWith(FileSearchRankingOptionsRanker, {
|
|
39
51
|
nullable: true
|
|
40
52
|
}),
|
|
41
53
|
"score_threshold": /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1))
|
|
42
54
|
}) {}
|
|
43
55
|
exports.FileSearchRankingOptions = FileSearchRankingOptions;
|
|
44
56
|
class AssistantToolsFileSearch extends /*#__PURE__*/S.Struct({
|
|
45
|
-
"type":
|
|
57
|
+
"type": AssistantToolsFileSearchType,
|
|
46
58
|
"file_search": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
47
59
|
"max_num_results": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50)), {
|
|
48
60
|
nullable: true
|
|
@@ -55,6 +67,8 @@ class AssistantToolsFileSearch extends /*#__PURE__*/S.Struct({
|
|
|
55
67
|
})
|
|
56
68
|
}) {}
|
|
57
69
|
exports.AssistantToolsFileSearch = AssistantToolsFileSearch;
|
|
70
|
+
class AssistantToolsFunctionType extends /*#__PURE__*/S.Literal("function") {}
|
|
71
|
+
exports.AssistantToolsFunctionType = AssistantToolsFunctionType;
|
|
58
72
|
class FunctionParameters extends /*#__PURE__*/S.Record({
|
|
59
73
|
key: S.String,
|
|
60
74
|
value: S.Unknown
|
|
@@ -75,25 +89,31 @@ class FunctionObject extends /*#__PURE__*/S.Struct({
|
|
|
75
89
|
}) {}
|
|
76
90
|
exports.FunctionObject = FunctionObject;
|
|
77
91
|
class AssistantToolsFunction extends /*#__PURE__*/S.Struct({
|
|
78
|
-
"type":
|
|
92
|
+
"type": AssistantToolsFunctionType,
|
|
79
93
|
"function": FunctionObject
|
|
80
94
|
}) {}
|
|
81
95
|
exports.AssistantToolsFunction = AssistantToolsFunction;
|
|
96
|
+
class ResponseFormatTextType extends /*#__PURE__*/S.Literal("text") {}
|
|
97
|
+
exports.ResponseFormatTextType = ResponseFormatTextType;
|
|
82
98
|
class ResponseFormatText extends /*#__PURE__*/S.Struct({
|
|
83
|
-
"type":
|
|
99
|
+
"type": ResponseFormatTextType
|
|
84
100
|
}) {}
|
|
85
101
|
exports.ResponseFormatText = ResponseFormatText;
|
|
102
|
+
class ResponseFormatJsonObjectType extends /*#__PURE__*/S.Literal("json_object") {}
|
|
103
|
+
exports.ResponseFormatJsonObjectType = ResponseFormatJsonObjectType;
|
|
86
104
|
class ResponseFormatJsonObject extends /*#__PURE__*/S.Struct({
|
|
87
|
-
"type":
|
|
105
|
+
"type": ResponseFormatJsonObjectType
|
|
88
106
|
}) {}
|
|
89
107
|
exports.ResponseFormatJsonObject = ResponseFormatJsonObject;
|
|
108
|
+
class ResponseFormatJsonSchemaType extends /*#__PURE__*/S.Literal("json_schema") {}
|
|
109
|
+
exports.ResponseFormatJsonSchemaType = ResponseFormatJsonSchemaType;
|
|
90
110
|
class ResponseFormatJsonSchemaSchema extends /*#__PURE__*/S.Record({
|
|
91
111
|
key: S.String,
|
|
92
112
|
value: S.Unknown
|
|
93
113
|
}) {}
|
|
94
114
|
exports.ResponseFormatJsonSchemaSchema = ResponseFormatJsonSchemaSchema;
|
|
95
115
|
class ResponseFormatJsonSchema extends /*#__PURE__*/S.Struct({
|
|
96
|
-
"type":
|
|
116
|
+
"type": ResponseFormatJsonSchemaType,
|
|
97
117
|
"json_schema": /*#__PURE__*/S.Struct({
|
|
98
118
|
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
99
119
|
nullable: true
|
|
@@ -113,7 +133,7 @@ class AssistantsApiResponseFormatOption extends /*#__PURE__*/S.Union( /*#__PURE_
|
|
|
113
133
|
exports.AssistantsApiResponseFormatOption = AssistantsApiResponseFormatOption;
|
|
114
134
|
class AssistantObject extends /*#__PURE__*/S.Struct({
|
|
115
135
|
"id": S.String,
|
|
116
|
-
"object":
|
|
136
|
+
"object": AssistantObjectObject,
|
|
117
137
|
"created_at": S.Int,
|
|
118
138
|
"name": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.String.pipe( /*#__PURE__*/S.maxLength(256))),
|
|
119
139
|
"description": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.String.pipe( /*#__PURE__*/S.maxLength(512))),
|
|
@@ -164,8 +184,12 @@ class ListAssistantsResponse extends /*#__PURE__*/S.Class("ListAssistantsRespons
|
|
|
164
184
|
"has_more": S.Boolean
|
|
165
185
|
}) {}
|
|
166
186
|
exports.ListAssistantsResponse = ListAssistantsResponse;
|
|
187
|
+
class CreateAssistantRequestModel extends /*#__PURE__*/S.Literal("gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613") {}
|
|
188
|
+
exports.CreateAssistantRequestModel = CreateAssistantRequestModel;
|
|
189
|
+
class CreateAssistantRequestToolResourcesFileSearchVectorStoresChunkingStrategyType extends /*#__PURE__*/S.Literal("static") {}
|
|
190
|
+
exports.CreateAssistantRequestToolResourcesFileSearchVectorStoresChunkingStrategyType = CreateAssistantRequestToolResourcesFileSearchVectorStoresChunkingStrategyType;
|
|
167
191
|
class CreateAssistantRequest extends /*#__PURE__*/S.Class("CreateAssistantRequest")({
|
|
168
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
192
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateAssistantRequestModel),
|
|
169
193
|
"name": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.String.pipe( /*#__PURE__*/S.maxLength(256)), {
|
|
170
194
|
nullable: true
|
|
171
195
|
}),
|
|
@@ -291,17 +315,25 @@ class ModifyAssistantRequest extends /*#__PURE__*/S.Class("ModifyAssistantReques
|
|
|
291
315
|
})
|
|
292
316
|
}) {}
|
|
293
317
|
exports.ModifyAssistantRequest = ModifyAssistantRequest;
|
|
318
|
+
class DeleteAssistantResponseObject extends /*#__PURE__*/S.Literal("assistant.deleted") {}
|
|
319
|
+
exports.DeleteAssistantResponseObject = DeleteAssistantResponseObject;
|
|
294
320
|
class DeleteAssistantResponse extends /*#__PURE__*/S.Class("DeleteAssistantResponse")({
|
|
295
321
|
"id": S.String,
|
|
296
322
|
"deleted": S.Boolean,
|
|
297
|
-
"object":
|
|
323
|
+
"object": DeleteAssistantResponseObject
|
|
298
324
|
}) {}
|
|
299
325
|
exports.DeleteAssistantResponse = DeleteAssistantResponse;
|
|
326
|
+
class CreateSpeechRequestModel extends /*#__PURE__*/S.Literal("tts-1", "tts-1-hd") {}
|
|
327
|
+
exports.CreateSpeechRequestModel = CreateSpeechRequestModel;
|
|
328
|
+
class CreateSpeechRequestVoice extends /*#__PURE__*/S.Literal("alloy", "ash", "coral", "echo", "fable", "onyx", "nova", "sage", "shimmer") {}
|
|
329
|
+
exports.CreateSpeechRequestVoice = CreateSpeechRequestVoice;
|
|
330
|
+
class CreateSpeechRequestResponseFormat extends /*#__PURE__*/S.Literal("mp3", "opus", "aac", "flac", "wav", "pcm") {}
|
|
331
|
+
exports.CreateSpeechRequestResponseFormat = CreateSpeechRequestResponseFormat;
|
|
300
332
|
class CreateSpeechRequest extends /*#__PURE__*/S.Class("CreateSpeechRequest")({
|
|
301
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
333
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateSpeechRequestModel),
|
|
302
334
|
"input": /*#__PURE__*/S.String.pipe( /*#__PURE__*/S.maxLength(4096)),
|
|
303
|
-
"voice":
|
|
304
|
-
"response_format": /*#__PURE__*/S.optionalWith(
|
|
335
|
+
"voice": CreateSpeechRequestVoice,
|
|
336
|
+
"response_format": /*#__PURE__*/S.optionalWith(CreateSpeechRequestResponseFormat, {
|
|
305
337
|
nullable: true,
|
|
306
338
|
default: () => "mp3"
|
|
307
339
|
}),
|
|
@@ -373,9 +405,13 @@ class ListBatchesParams extends /*#__PURE__*/S.Struct({
|
|
|
373
405
|
})
|
|
374
406
|
}) {}
|
|
375
407
|
exports.ListBatchesParams = ListBatchesParams;
|
|
408
|
+
class BatchObject extends /*#__PURE__*/S.Literal("batch") {}
|
|
409
|
+
exports.BatchObject = BatchObject;
|
|
410
|
+
class BatchStatus extends /*#__PURE__*/S.Literal("validating", "failed", "in_progress", "finalizing", "completed", "expired", "cancelling", "cancelled") {}
|
|
411
|
+
exports.BatchStatus = BatchStatus;
|
|
376
412
|
class Batch extends /*#__PURE__*/S.Struct({
|
|
377
413
|
"id": S.String,
|
|
378
|
-
"object":
|
|
414
|
+
"object": BatchObject,
|
|
379
415
|
"endpoint": S.String,
|
|
380
416
|
"errors": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
381
417
|
"object": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -402,7 +438,7 @@ class Batch extends /*#__PURE__*/S.Struct({
|
|
|
402
438
|
}),
|
|
403
439
|
"input_file_id": S.String,
|
|
404
440
|
"completion_window": S.String,
|
|
405
|
-
"status":
|
|
441
|
+
"status": BatchStatus,
|
|
406
442
|
"output_file_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
407
443
|
nullable: true
|
|
408
444
|
}),
|
|
@@ -449,6 +485,8 @@ class Batch extends /*#__PURE__*/S.Struct({
|
|
|
449
485
|
})
|
|
450
486
|
}) {}
|
|
451
487
|
exports.Batch = Batch;
|
|
488
|
+
class ListBatchesResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
489
|
+
exports.ListBatchesResponseObject = ListBatchesResponseObject;
|
|
452
490
|
class ListBatchesResponse extends /*#__PURE__*/S.Class("ListBatchesResponse")({
|
|
453
491
|
"data": /*#__PURE__*/S.Array(Batch),
|
|
454
492
|
"first_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -458,13 +496,17 @@ class ListBatchesResponse extends /*#__PURE__*/S.Class("ListBatchesResponse")({
|
|
|
458
496
|
nullable: true
|
|
459
497
|
}),
|
|
460
498
|
"has_more": S.Boolean,
|
|
461
|
-
"object":
|
|
499
|
+
"object": ListBatchesResponseObject
|
|
462
500
|
}) {}
|
|
463
501
|
exports.ListBatchesResponse = ListBatchesResponse;
|
|
502
|
+
class CreateBatchRequestEndpoint extends /*#__PURE__*/S.Literal("/v1/chat/completions", "/v1/embeddings", "/v1/completions") {}
|
|
503
|
+
exports.CreateBatchRequestEndpoint = CreateBatchRequestEndpoint;
|
|
504
|
+
class CreateBatchRequestCompletionWindow extends /*#__PURE__*/S.Literal("24h") {}
|
|
505
|
+
exports.CreateBatchRequestCompletionWindow = CreateBatchRequestCompletionWindow;
|
|
464
506
|
class CreateBatchRequest extends /*#__PURE__*/S.Class("CreateBatchRequest")({
|
|
465
507
|
"input_file_id": S.String,
|
|
466
|
-
"endpoint":
|
|
467
|
-
"completion_window":
|
|
508
|
+
"endpoint": CreateBatchRequestEndpoint,
|
|
509
|
+
"completion_window": CreateBatchRequestCompletionWindow,
|
|
468
510
|
"metadata": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
469
511
|
key: S.String,
|
|
470
512
|
value: S.Unknown
|
|
@@ -473,60 +515,90 @@ class CreateBatchRequest extends /*#__PURE__*/S.Class("CreateBatchRequest")({
|
|
|
473
515
|
})
|
|
474
516
|
}) {}
|
|
475
517
|
exports.CreateBatchRequest = CreateBatchRequest;
|
|
518
|
+
class ChatCompletionRequestMessageContentPartTextType extends /*#__PURE__*/S.Literal("text") {}
|
|
519
|
+
exports.ChatCompletionRequestMessageContentPartTextType = ChatCompletionRequestMessageContentPartTextType;
|
|
476
520
|
class ChatCompletionRequestMessageContentPartText extends /*#__PURE__*/S.Struct({
|
|
477
|
-
"type":
|
|
521
|
+
"type": ChatCompletionRequestMessageContentPartTextType,
|
|
478
522
|
"text": S.String
|
|
479
523
|
}) {}
|
|
480
524
|
exports.ChatCompletionRequestMessageContentPartText = ChatCompletionRequestMessageContentPartText;
|
|
525
|
+
class ChatCompletionRequestDeveloperMessageRole extends /*#__PURE__*/S.Literal("developer") {}
|
|
526
|
+
exports.ChatCompletionRequestDeveloperMessageRole = ChatCompletionRequestDeveloperMessageRole;
|
|
527
|
+
class ChatCompletionRequestDeveloperMessage extends /*#__PURE__*/S.Struct({
|
|
528
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestMessageContentPartText)),
|
|
529
|
+
"role": ChatCompletionRequestDeveloperMessageRole,
|
|
530
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
531
|
+
nullable: true
|
|
532
|
+
})
|
|
533
|
+
}) {}
|
|
534
|
+
exports.ChatCompletionRequestDeveloperMessage = ChatCompletionRequestDeveloperMessage;
|
|
481
535
|
class ChatCompletionRequestSystemMessageContentPart extends ChatCompletionRequestMessageContentPartText {}
|
|
482
536
|
exports.ChatCompletionRequestSystemMessageContentPart = ChatCompletionRequestSystemMessageContentPart;
|
|
537
|
+
class ChatCompletionRequestSystemMessageRole extends /*#__PURE__*/S.Literal("system") {}
|
|
538
|
+
exports.ChatCompletionRequestSystemMessageRole = ChatCompletionRequestSystemMessageRole;
|
|
483
539
|
class ChatCompletionRequestSystemMessage extends /*#__PURE__*/S.Struct({
|
|
484
540
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestSystemMessageContentPart)),
|
|
485
|
-
"role":
|
|
541
|
+
"role": ChatCompletionRequestSystemMessageRole,
|
|
486
542
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
487
543
|
nullable: true
|
|
488
544
|
})
|
|
489
545
|
}) {}
|
|
490
546
|
exports.ChatCompletionRequestSystemMessage = ChatCompletionRequestSystemMessage;
|
|
547
|
+
class ChatCompletionRequestMessageContentPartImageType extends /*#__PURE__*/S.Literal("image_url") {}
|
|
548
|
+
exports.ChatCompletionRequestMessageContentPartImageType = ChatCompletionRequestMessageContentPartImageType;
|
|
549
|
+
class ChatCompletionRequestMessageContentPartImageImageUrlDetail extends /*#__PURE__*/S.Literal("auto", "low", "high") {}
|
|
550
|
+
exports.ChatCompletionRequestMessageContentPartImageImageUrlDetail = ChatCompletionRequestMessageContentPartImageImageUrlDetail;
|
|
491
551
|
class ChatCompletionRequestMessageContentPartImage extends /*#__PURE__*/S.Struct({
|
|
492
|
-
"type":
|
|
552
|
+
"type": ChatCompletionRequestMessageContentPartImageType,
|
|
493
553
|
"image_url": /*#__PURE__*/S.Struct({
|
|
494
554
|
"url": S.String,
|
|
495
|
-
"detail": /*#__PURE__*/S.optionalWith(
|
|
555
|
+
"detail": /*#__PURE__*/S.optionalWith(ChatCompletionRequestMessageContentPartImageImageUrlDetail, {
|
|
496
556
|
nullable: true,
|
|
497
557
|
default: () => "auto"
|
|
498
558
|
})
|
|
499
559
|
})
|
|
500
560
|
}) {}
|
|
501
561
|
exports.ChatCompletionRequestMessageContentPartImage = ChatCompletionRequestMessageContentPartImage;
|
|
562
|
+
class ChatCompletionRequestMessageContentPartAudioType extends /*#__PURE__*/S.Literal("input_audio") {}
|
|
563
|
+
exports.ChatCompletionRequestMessageContentPartAudioType = ChatCompletionRequestMessageContentPartAudioType;
|
|
564
|
+
class ChatCompletionRequestMessageContentPartAudioInputAudioFormat extends /*#__PURE__*/S.Literal("wav", "mp3") {}
|
|
565
|
+
exports.ChatCompletionRequestMessageContentPartAudioInputAudioFormat = ChatCompletionRequestMessageContentPartAudioInputAudioFormat;
|
|
502
566
|
class ChatCompletionRequestMessageContentPartAudio extends /*#__PURE__*/S.Struct({
|
|
503
|
-
"type":
|
|
567
|
+
"type": ChatCompletionRequestMessageContentPartAudioType,
|
|
504
568
|
"input_audio": /*#__PURE__*/S.Struct({
|
|
505
569
|
"data": S.String,
|
|
506
|
-
"format":
|
|
570
|
+
"format": ChatCompletionRequestMessageContentPartAudioInputAudioFormat
|
|
507
571
|
})
|
|
508
572
|
}) {}
|
|
509
573
|
exports.ChatCompletionRequestMessageContentPartAudio = ChatCompletionRequestMessageContentPartAudio;
|
|
510
574
|
class ChatCompletionRequestUserMessageContentPart extends /*#__PURE__*/S.Union(ChatCompletionRequestMessageContentPartText, ChatCompletionRequestMessageContentPartImage, ChatCompletionRequestMessageContentPartAudio) {}
|
|
511
575
|
exports.ChatCompletionRequestUserMessageContentPart = ChatCompletionRequestUserMessageContentPart;
|
|
576
|
+
class ChatCompletionRequestUserMessageRole extends /*#__PURE__*/S.Literal("user") {}
|
|
577
|
+
exports.ChatCompletionRequestUserMessageRole = ChatCompletionRequestUserMessageRole;
|
|
512
578
|
class ChatCompletionRequestUserMessage extends /*#__PURE__*/S.Struct({
|
|
513
579
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestUserMessageContentPart)),
|
|
514
|
-
"role":
|
|
580
|
+
"role": ChatCompletionRequestUserMessageRole,
|
|
515
581
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
516
582
|
nullable: true
|
|
517
583
|
})
|
|
518
584
|
}) {}
|
|
519
585
|
exports.ChatCompletionRequestUserMessage = ChatCompletionRequestUserMessage;
|
|
586
|
+
class ChatCompletionRequestMessageContentPartRefusalType extends /*#__PURE__*/S.Literal("refusal") {}
|
|
587
|
+
exports.ChatCompletionRequestMessageContentPartRefusalType = ChatCompletionRequestMessageContentPartRefusalType;
|
|
520
588
|
class ChatCompletionRequestMessageContentPartRefusal extends /*#__PURE__*/S.Struct({
|
|
521
|
-
"type":
|
|
589
|
+
"type": ChatCompletionRequestMessageContentPartRefusalType,
|
|
522
590
|
"refusal": S.String
|
|
523
591
|
}) {}
|
|
524
592
|
exports.ChatCompletionRequestMessageContentPartRefusal = ChatCompletionRequestMessageContentPartRefusal;
|
|
525
593
|
class ChatCompletionRequestAssistantMessageContentPart extends /*#__PURE__*/S.Union(ChatCompletionRequestMessageContentPartText, ChatCompletionRequestMessageContentPartRefusal) {}
|
|
526
594
|
exports.ChatCompletionRequestAssistantMessageContentPart = ChatCompletionRequestAssistantMessageContentPart;
|
|
595
|
+
class ChatCompletionRequestAssistantMessageRole extends /*#__PURE__*/S.Literal("assistant") {}
|
|
596
|
+
exports.ChatCompletionRequestAssistantMessageRole = ChatCompletionRequestAssistantMessageRole;
|
|
597
|
+
class ChatCompletionMessageToolCallType extends /*#__PURE__*/S.Literal("function") {}
|
|
598
|
+
exports.ChatCompletionMessageToolCallType = ChatCompletionMessageToolCallType;
|
|
527
599
|
class ChatCompletionMessageToolCall extends /*#__PURE__*/S.Struct({
|
|
528
600
|
"id": S.String,
|
|
529
|
-
"type":
|
|
601
|
+
"type": ChatCompletionMessageToolCallType,
|
|
530
602
|
"function": /*#__PURE__*/S.Struct({
|
|
531
603
|
"name": S.String,
|
|
532
604
|
"arguments": S.String
|
|
@@ -542,7 +614,7 @@ class ChatCompletionRequestAssistantMessage extends /*#__PURE__*/S.Struct({
|
|
|
542
614
|
"refusal": /*#__PURE__*/S.optionalWith(S.String, {
|
|
543
615
|
nullable: true
|
|
544
616
|
}),
|
|
545
|
-
"role":
|
|
617
|
+
"role": ChatCompletionRequestAssistantMessageRole,
|
|
546
618
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
547
619
|
nullable: true
|
|
548
620
|
}),
|
|
@@ -562,37 +634,62 @@ class ChatCompletionRequestAssistantMessage extends /*#__PURE__*/S.Struct({
|
|
|
562
634
|
})
|
|
563
635
|
}) {}
|
|
564
636
|
exports.ChatCompletionRequestAssistantMessage = ChatCompletionRequestAssistantMessage;
|
|
637
|
+
class ChatCompletionRequestToolMessageRole extends /*#__PURE__*/S.Literal("tool") {}
|
|
638
|
+
exports.ChatCompletionRequestToolMessageRole = ChatCompletionRequestToolMessageRole;
|
|
565
639
|
class ChatCompletionRequestToolMessageContentPart extends ChatCompletionRequestMessageContentPartText {}
|
|
566
640
|
exports.ChatCompletionRequestToolMessageContentPart = ChatCompletionRequestToolMessageContentPart;
|
|
567
641
|
class ChatCompletionRequestToolMessage extends /*#__PURE__*/S.Struct({
|
|
568
|
-
"role":
|
|
642
|
+
"role": ChatCompletionRequestToolMessageRole,
|
|
569
643
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestToolMessageContentPart)),
|
|
570
644
|
"tool_call_id": S.String
|
|
571
645
|
}) {}
|
|
572
646
|
exports.ChatCompletionRequestToolMessage = ChatCompletionRequestToolMessage;
|
|
647
|
+
class ChatCompletionRequestFunctionMessageRole extends /*#__PURE__*/S.Literal("function") {}
|
|
648
|
+
exports.ChatCompletionRequestFunctionMessageRole = ChatCompletionRequestFunctionMessageRole;
|
|
573
649
|
class ChatCompletionRequestFunctionMessage extends /*#__PURE__*/S.Struct({
|
|
574
|
-
"role":
|
|
650
|
+
"role": ChatCompletionRequestFunctionMessageRole,
|
|
575
651
|
"content": /*#__PURE__*/S.NullOr(S.String),
|
|
576
652
|
"name": S.String
|
|
577
653
|
}) {}
|
|
578
654
|
exports.ChatCompletionRequestFunctionMessage = ChatCompletionRequestFunctionMessage;
|
|
579
|
-
class ChatCompletionRequestMessage extends /*#__PURE__*/S.Union(ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage, ChatCompletionRequestAssistantMessage, ChatCompletionRequestToolMessage, ChatCompletionRequestFunctionMessage) {}
|
|
655
|
+
class ChatCompletionRequestMessage extends /*#__PURE__*/S.Union(ChatCompletionRequestDeveloperMessage, ChatCompletionRequestSystemMessage, ChatCompletionRequestUserMessage, ChatCompletionRequestAssistantMessage, ChatCompletionRequestToolMessage, ChatCompletionRequestFunctionMessage) {}
|
|
580
656
|
exports.ChatCompletionRequestMessage = ChatCompletionRequestMessage;
|
|
657
|
+
class CreateChatCompletionRequestModel extends /*#__PURE__*/S.Literal("o1", "o1-2024-12-17", "o1-preview", "o1-preview-2024-09-12", "o1-mini", "o1-mini-2024-09-12", "gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-audio-preview", "gpt-4o-audio-preview-2024-10-01", "gpt-4o-audio-preview-2024-12-17", "gpt-4o-mini-audio-preview", "gpt-4o-mini-audio-preview-2024-12-17", "chatgpt-4o-latest", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0301", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613") {}
|
|
658
|
+
exports.CreateChatCompletionRequestModel = CreateChatCompletionRequestModel;
|
|
659
|
+
class CreateChatCompletionRequestReasoningEffort extends /*#__PURE__*/S.Literal("low", "medium", "high") {}
|
|
660
|
+
exports.CreateChatCompletionRequestReasoningEffort = CreateChatCompletionRequestReasoningEffort;
|
|
581
661
|
class ChatCompletionModalities extends /*#__PURE__*/S.Array( /*#__PURE__*/S.Literal("text", "audio")) {}
|
|
582
662
|
exports.ChatCompletionModalities = ChatCompletionModalities;
|
|
663
|
+
class PredictionContentType extends /*#__PURE__*/S.Literal("content") {}
|
|
664
|
+
exports.PredictionContentType = PredictionContentType;
|
|
665
|
+
class PredictionContent extends /*#__PURE__*/S.Struct({
|
|
666
|
+
"type": PredictionContentType,
|
|
667
|
+
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestMessageContentPartText))
|
|
668
|
+
}) {}
|
|
669
|
+
exports.PredictionContent = PredictionContent;
|
|
670
|
+
class CreateChatCompletionRequestAudioVoice extends /*#__PURE__*/S.Literal("alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse") {}
|
|
671
|
+
exports.CreateChatCompletionRequestAudioVoice = CreateChatCompletionRequestAudioVoice;
|
|
672
|
+
class CreateChatCompletionRequestAudioFormat extends /*#__PURE__*/S.Literal("wav", "mp3", "flac", "opus", "pcm16") {}
|
|
673
|
+
exports.CreateChatCompletionRequestAudioFormat = CreateChatCompletionRequestAudioFormat;
|
|
674
|
+
class CreateChatCompletionRequestServiceTier extends /*#__PURE__*/S.Literal("auto", "default") {}
|
|
675
|
+
exports.CreateChatCompletionRequestServiceTier = CreateChatCompletionRequestServiceTier;
|
|
583
676
|
class ChatCompletionStreamOptions extends /*#__PURE__*/S.Struct({
|
|
584
677
|
"include_usage": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
585
678
|
nullable: true
|
|
586
679
|
})
|
|
587
680
|
}) {}
|
|
588
681
|
exports.ChatCompletionStreamOptions = ChatCompletionStreamOptions;
|
|
682
|
+
class ChatCompletionToolType extends /*#__PURE__*/S.Literal("function") {}
|
|
683
|
+
exports.ChatCompletionToolType = ChatCompletionToolType;
|
|
589
684
|
class ChatCompletionTool extends /*#__PURE__*/S.Struct({
|
|
590
|
-
"type":
|
|
685
|
+
"type": ChatCompletionToolType,
|
|
591
686
|
"function": FunctionObject
|
|
592
687
|
}) {}
|
|
593
688
|
exports.ChatCompletionTool = ChatCompletionTool;
|
|
689
|
+
class ChatCompletionNamedToolChoiceType extends /*#__PURE__*/S.Literal("function") {}
|
|
690
|
+
exports.ChatCompletionNamedToolChoiceType = ChatCompletionNamedToolChoiceType;
|
|
594
691
|
class ChatCompletionNamedToolChoice extends /*#__PURE__*/S.Struct({
|
|
595
|
-
"type":
|
|
692
|
+
"type": ChatCompletionNamedToolChoiceType,
|
|
596
693
|
"function": /*#__PURE__*/S.Struct({
|
|
597
694
|
"name": S.String
|
|
598
695
|
})
|
|
@@ -602,6 +699,8 @@ class ChatCompletionToolChoiceOption extends /*#__PURE__*/S.Union( /*#__PURE__*/
|
|
|
602
699
|
exports.ChatCompletionToolChoiceOption = ChatCompletionToolChoiceOption;
|
|
603
700
|
class ParallelToolCalls extends S.Boolean {}
|
|
604
701
|
exports.ParallelToolCalls = ParallelToolCalls;
|
|
702
|
+
class CreateChatCompletionRequestFunctionCall extends /*#__PURE__*/S.Literal("none", "auto") {}
|
|
703
|
+
exports.CreateChatCompletionRequestFunctionCall = CreateChatCompletionRequestFunctionCall;
|
|
605
704
|
class ChatCompletionFunctionCallOption extends /*#__PURE__*/S.Struct({
|
|
606
705
|
"name": S.String
|
|
607
706
|
}) {}
|
|
@@ -618,11 +717,15 @@ class ChatCompletionFunctions extends /*#__PURE__*/S.Struct({
|
|
|
618
717
|
exports.ChatCompletionFunctions = ChatCompletionFunctions;
|
|
619
718
|
class CreateChatCompletionRequest extends /*#__PURE__*/S.Class("CreateChatCompletionRequest")({
|
|
620
719
|
"messages": /*#__PURE__*/S.NonEmptyArray(ChatCompletionRequestMessage),
|
|
621
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
720
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateChatCompletionRequestModel),
|
|
622
721
|
"store": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
623
722
|
nullable: true,
|
|
624
723
|
default: () => false
|
|
625
724
|
}),
|
|
725
|
+
"reasoning_effort": /*#__PURE__*/S.optionalWith(CreateChatCompletionRequestReasoningEffort, {
|
|
726
|
+
nullable: true,
|
|
727
|
+
default: () => "medium"
|
|
728
|
+
}),
|
|
626
729
|
"metadata": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
627
730
|
key: S.String,
|
|
628
731
|
value: S.Unknown
|
|
@@ -659,9 +762,12 @@ class CreateChatCompletionRequest extends /*#__PURE__*/S.Class("CreateChatComple
|
|
|
659
762
|
"modalities": /*#__PURE__*/S.optionalWith(ChatCompletionModalities, {
|
|
660
763
|
nullable: true
|
|
661
764
|
}),
|
|
765
|
+
"prediction": /*#__PURE__*/S.optionalWith(PredictionContent, {
|
|
766
|
+
nullable: true
|
|
767
|
+
}),
|
|
662
768
|
"audio": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
663
|
-
"voice":
|
|
664
|
-
"format":
|
|
769
|
+
"voice": CreateChatCompletionRequestAudioVoice,
|
|
770
|
+
"format": CreateChatCompletionRequestAudioFormat
|
|
665
771
|
}), {
|
|
666
772
|
nullable: true
|
|
667
773
|
}),
|
|
@@ -672,10 +778,10 @@ class CreateChatCompletionRequest extends /*#__PURE__*/S.Class("CreateChatComple
|
|
|
672
778
|
"response_format": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(ResponseFormatText, ResponseFormatJsonObject, ResponseFormatJsonSchema), {
|
|
673
779
|
nullable: true
|
|
674
780
|
}),
|
|
675
|
-
"seed": /*#__PURE__*/S.optionalWith(
|
|
781
|
+
"seed": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
676
782
|
nullable: true
|
|
677
783
|
}),
|
|
678
|
-
"service_tier": /*#__PURE__*/S.optionalWith(
|
|
784
|
+
"service_tier": /*#__PURE__*/S.optionalWith(CreateChatCompletionRequestServiceTier, {
|
|
679
785
|
nullable: true,
|
|
680
786
|
default: () => "auto"
|
|
681
787
|
}),
|
|
@@ -710,7 +816,7 @@ class CreateChatCompletionRequest extends /*#__PURE__*/S.Class("CreateChatComple
|
|
|
710
816
|
"user": /*#__PURE__*/S.optionalWith(S.String, {
|
|
711
817
|
nullable: true
|
|
712
818
|
}),
|
|
713
|
-
"function_call": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(
|
|
819
|
+
"function_call": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(CreateChatCompletionRequestFunctionCall, ChatCompletionFunctionCallOption), {
|
|
714
820
|
nullable: true
|
|
715
821
|
}),
|
|
716
822
|
"functions": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(ChatCompletionFunctions).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(128)), {
|
|
@@ -718,13 +824,17 @@ class CreateChatCompletionRequest extends /*#__PURE__*/S.Class("CreateChatComple
|
|
|
718
824
|
})
|
|
719
825
|
}) {}
|
|
720
826
|
exports.CreateChatCompletionRequest = CreateChatCompletionRequest;
|
|
827
|
+
class CreateChatCompletionResponseChoicesFinishReason extends /*#__PURE__*/S.Literal("stop", "length", "tool_calls", "content_filter", "function_call") {}
|
|
828
|
+
exports.CreateChatCompletionResponseChoicesFinishReason = CreateChatCompletionResponseChoicesFinishReason;
|
|
829
|
+
class ChatCompletionResponseMessageRole extends /*#__PURE__*/S.Literal("assistant") {}
|
|
830
|
+
exports.ChatCompletionResponseMessageRole = ChatCompletionResponseMessageRole;
|
|
721
831
|
class ChatCompletionResponseMessage extends /*#__PURE__*/S.Struct({
|
|
722
832
|
"content": /*#__PURE__*/S.NullOr(S.String),
|
|
723
833
|
"refusal": /*#__PURE__*/S.NullOr(S.String),
|
|
724
834
|
"tool_calls": /*#__PURE__*/S.optionalWith(ChatCompletionMessageToolCalls, {
|
|
725
835
|
nullable: true
|
|
726
836
|
}),
|
|
727
|
-
"role":
|
|
837
|
+
"role": ChatCompletionResponseMessageRole,
|
|
728
838
|
"function_call": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
729
839
|
"arguments": S.String,
|
|
730
840
|
"name": S.String
|
|
@@ -752,16 +862,26 @@ class ChatCompletionTokenLogprob extends /*#__PURE__*/S.Struct({
|
|
|
752
862
|
}))
|
|
753
863
|
}) {}
|
|
754
864
|
exports.ChatCompletionTokenLogprob = ChatCompletionTokenLogprob;
|
|
865
|
+
class CreateChatCompletionResponseServiceTier extends /*#__PURE__*/S.Literal("scale", "default") {}
|
|
866
|
+
exports.CreateChatCompletionResponseServiceTier = CreateChatCompletionResponseServiceTier;
|
|
867
|
+
class CreateChatCompletionResponseObject extends /*#__PURE__*/S.Literal("chat.completion") {}
|
|
868
|
+
exports.CreateChatCompletionResponseObject = CreateChatCompletionResponseObject;
|
|
755
869
|
class CompletionUsage extends /*#__PURE__*/S.Struct({
|
|
756
870
|
"completion_tokens": S.Int,
|
|
757
871
|
"prompt_tokens": S.Int,
|
|
758
872
|
"total_tokens": S.Int,
|
|
759
873
|
"completion_tokens_details": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
874
|
+
"accepted_prediction_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
875
|
+
nullable: true
|
|
876
|
+
}),
|
|
760
877
|
"audio_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
761
878
|
nullable: true
|
|
762
879
|
}),
|
|
763
880
|
"reasoning_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
764
881
|
nullable: true
|
|
882
|
+
}),
|
|
883
|
+
"rejected_prediction_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
884
|
+
nullable: true
|
|
765
885
|
})
|
|
766
886
|
}), {
|
|
767
887
|
nullable: true
|
|
@@ -781,7 +901,7 @@ exports.CompletionUsage = CompletionUsage;
|
|
|
781
901
|
class CreateChatCompletionResponse extends /*#__PURE__*/S.Class("CreateChatCompletionResponse")({
|
|
782
902
|
"id": S.String,
|
|
783
903
|
"choices": /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
784
|
-
"finish_reason":
|
|
904
|
+
"finish_reason": CreateChatCompletionResponseChoicesFinishReason,
|
|
785
905
|
"index": S.Int,
|
|
786
906
|
"message": ChatCompletionResponseMessage,
|
|
787
907
|
"logprobs": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
@@ -791,20 +911,22 @@ class CreateChatCompletionResponse extends /*#__PURE__*/S.Class("CreateChatCompl
|
|
|
791
911
|
})),
|
|
792
912
|
"created": S.Int,
|
|
793
913
|
"model": S.String,
|
|
794
|
-
"service_tier": /*#__PURE__*/S.optionalWith(
|
|
914
|
+
"service_tier": /*#__PURE__*/S.optionalWith(CreateChatCompletionResponseServiceTier, {
|
|
795
915
|
nullable: true
|
|
796
916
|
}),
|
|
797
917
|
"system_fingerprint": /*#__PURE__*/S.optionalWith(S.String, {
|
|
798
918
|
nullable: true
|
|
799
919
|
}),
|
|
800
|
-
"object":
|
|
920
|
+
"object": CreateChatCompletionResponseObject,
|
|
801
921
|
"usage": /*#__PURE__*/S.optionalWith(CompletionUsage, {
|
|
802
922
|
nullable: true
|
|
803
923
|
})
|
|
804
924
|
}) {}
|
|
805
925
|
exports.CreateChatCompletionResponse = CreateChatCompletionResponse;
|
|
926
|
+
class CreateCompletionRequestModel extends /*#__PURE__*/S.Literal("gpt-3.5-turbo-instruct", "davinci-002", "babbage-002") {}
|
|
927
|
+
exports.CreateCompletionRequestModel = CreateCompletionRequestModel;
|
|
806
928
|
class CreateCompletionRequest extends /*#__PURE__*/S.Class("CreateCompletionRequest")({
|
|
807
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
929
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateCompletionRequestModel),
|
|
808
930
|
"prompt": /*#__PURE__*/S.NullOr(S.Union(S.String, S.Array(S.String), S.NonEmptyArray(S.Int), S.NonEmptyArray(S.NonEmptyArray(S.Int)))).pipe(S.propertySignature, /*#__PURE__*/S.withConstructorDefault(() => "<|endoftext|>")),
|
|
809
931
|
"best_of": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(20)), {
|
|
810
932
|
nullable: true,
|
|
@@ -839,7 +961,7 @@ class CreateCompletionRequest extends /*#__PURE__*/S.Class("CreateCompletionRequ
|
|
|
839
961
|
nullable: true,
|
|
840
962
|
default: () => 0
|
|
841
963
|
}),
|
|
842
|
-
"seed": /*#__PURE__*/S.optionalWith(
|
|
964
|
+
"seed": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
843
965
|
nullable: true
|
|
844
966
|
}),
|
|
845
967
|
"stop": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(S.String).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(4))), {
|
|
@@ -868,10 +990,14 @@ class CreateCompletionRequest extends /*#__PURE__*/S.Class("CreateCompletionRequ
|
|
|
868
990
|
})
|
|
869
991
|
}) {}
|
|
870
992
|
exports.CreateCompletionRequest = CreateCompletionRequest;
|
|
993
|
+
class CreateCompletionResponseChoicesFinishReason extends /*#__PURE__*/S.Literal("stop", "length", "content_filter") {}
|
|
994
|
+
exports.CreateCompletionResponseChoicesFinishReason = CreateCompletionResponseChoicesFinishReason;
|
|
995
|
+
class CreateCompletionResponseObject extends /*#__PURE__*/S.Literal("text_completion") {}
|
|
996
|
+
exports.CreateCompletionResponseObject = CreateCompletionResponseObject;
|
|
871
997
|
class CreateCompletionResponse extends /*#__PURE__*/S.Class("CreateCompletionResponse")({
|
|
872
998
|
"id": S.String,
|
|
873
999
|
"choices": /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
874
|
-
"finish_reason":
|
|
1000
|
+
"finish_reason": CreateCompletionResponseChoicesFinishReason,
|
|
875
1001
|
"index": S.Int,
|
|
876
1002
|
"logprobs": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
877
1003
|
"text_offset": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.Int), {
|
|
@@ -897,16 +1023,20 @@ class CreateCompletionResponse extends /*#__PURE__*/S.Class("CreateCompletionRes
|
|
|
897
1023
|
"system_fingerprint": /*#__PURE__*/S.optionalWith(S.String, {
|
|
898
1024
|
nullable: true
|
|
899
1025
|
}),
|
|
900
|
-
"object":
|
|
1026
|
+
"object": CreateCompletionResponseObject,
|
|
901
1027
|
"usage": /*#__PURE__*/S.optionalWith(CompletionUsage, {
|
|
902
1028
|
nullable: true
|
|
903
1029
|
})
|
|
904
1030
|
}) {}
|
|
905
1031
|
exports.CreateCompletionResponse = CreateCompletionResponse;
|
|
1032
|
+
class CreateEmbeddingRequestModel extends /*#__PURE__*/S.Literal("text-embedding-ada-002", "text-embedding-3-small", "text-embedding-3-large") {}
|
|
1033
|
+
exports.CreateEmbeddingRequestModel = CreateEmbeddingRequestModel;
|
|
1034
|
+
class CreateEmbeddingRequestEncodingFormat extends /*#__PURE__*/S.Literal("float", "base64") {}
|
|
1035
|
+
exports.CreateEmbeddingRequestEncodingFormat = CreateEmbeddingRequestEncodingFormat;
|
|
906
1036
|
class CreateEmbeddingRequest extends /*#__PURE__*/S.Class("CreateEmbeddingRequest")({
|
|
907
1037
|
"input": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(S.String).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(2048)), /*#__PURE__*/S.Array(S.Int).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(2048)), /*#__PURE__*/S.Array(S.NonEmptyArray(S.Int)).pipe( /*#__PURE__*/S.minItems(1), /*#__PURE__*/S.maxItems(2048))),
|
|
908
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
909
|
-
"encoding_format": /*#__PURE__*/S.optionalWith(
|
|
1038
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateEmbeddingRequestModel),
|
|
1039
|
+
"encoding_format": /*#__PURE__*/S.optionalWith(CreateEmbeddingRequestEncodingFormat, {
|
|
910
1040
|
nullable: true,
|
|
911
1041
|
default: () => "float"
|
|
912
1042
|
}),
|
|
@@ -918,49 +1048,77 @@ class CreateEmbeddingRequest extends /*#__PURE__*/S.Class("CreateEmbeddingReques
|
|
|
918
1048
|
})
|
|
919
1049
|
}) {}
|
|
920
1050
|
exports.CreateEmbeddingRequest = CreateEmbeddingRequest;
|
|
1051
|
+
class EmbeddingObject extends /*#__PURE__*/S.Literal("embedding") {}
|
|
1052
|
+
exports.EmbeddingObject = EmbeddingObject;
|
|
921
1053
|
class Embedding extends /*#__PURE__*/S.Struct({
|
|
922
1054
|
"index": S.Int,
|
|
923
1055
|
"embedding": /*#__PURE__*/S.Array(S.Number),
|
|
924
|
-
"object":
|
|
1056
|
+
"object": EmbeddingObject
|
|
925
1057
|
}) {}
|
|
926
1058
|
exports.Embedding = Embedding;
|
|
1059
|
+
class CreateEmbeddingResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1060
|
+
exports.CreateEmbeddingResponseObject = CreateEmbeddingResponseObject;
|
|
927
1061
|
class CreateEmbeddingResponse extends /*#__PURE__*/S.Class("CreateEmbeddingResponse")({
|
|
928
1062
|
"data": /*#__PURE__*/S.Array(Embedding),
|
|
929
1063
|
"model": S.String,
|
|
930
|
-
"object":
|
|
1064
|
+
"object": CreateEmbeddingResponseObject,
|
|
931
1065
|
"usage": /*#__PURE__*/S.Struct({
|
|
932
1066
|
"prompt_tokens": S.Int,
|
|
933
1067
|
"total_tokens": S.Int
|
|
934
1068
|
})
|
|
935
1069
|
}) {}
|
|
936
1070
|
exports.CreateEmbeddingResponse = CreateEmbeddingResponse;
|
|
1071
|
+
class ListFilesParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
1072
|
+
exports.ListFilesParamsOrder = ListFilesParamsOrder;
|
|
937
1073
|
class ListFilesParams extends /*#__PURE__*/S.Struct({
|
|
938
1074
|
"purpose": /*#__PURE__*/S.optionalWith(S.String, {
|
|
939
1075
|
nullable: true
|
|
1076
|
+
}),
|
|
1077
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1078
|
+
nullable: true,
|
|
1079
|
+
default: () => 10000
|
|
1080
|
+
}),
|
|
1081
|
+
"order": /*#__PURE__*/S.optionalWith(ListFilesParamsOrder, {
|
|
1082
|
+
nullable: true,
|
|
1083
|
+
default: () => "desc"
|
|
1084
|
+
}),
|
|
1085
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1086
|
+
nullable: true
|
|
940
1087
|
})
|
|
941
1088
|
}) {}
|
|
942
1089
|
exports.ListFilesParams = ListFilesParams;
|
|
1090
|
+
class OpenAIFileObject extends /*#__PURE__*/S.Literal("file") {}
|
|
1091
|
+
exports.OpenAIFileObject = OpenAIFileObject;
|
|
1092
|
+
class OpenAIFilePurpose extends /*#__PURE__*/S.Literal("assistants", "assistants_output", "batch", "batch_output", "fine-tune", "fine-tune-results", "vision") {}
|
|
1093
|
+
exports.OpenAIFilePurpose = OpenAIFilePurpose;
|
|
1094
|
+
class OpenAIFileStatus extends /*#__PURE__*/S.Literal("uploaded", "processed", "error") {}
|
|
1095
|
+
exports.OpenAIFileStatus = OpenAIFileStatus;
|
|
943
1096
|
class OpenAIFile extends /*#__PURE__*/S.Struct({
|
|
944
1097
|
"id": S.String,
|
|
945
1098
|
"bytes": S.Int,
|
|
946
1099
|
"created_at": S.Int,
|
|
947
1100
|
"filename": S.String,
|
|
948
|
-
"object":
|
|
949
|
-
"purpose":
|
|
950
|
-
"status":
|
|
1101
|
+
"object": OpenAIFileObject,
|
|
1102
|
+
"purpose": OpenAIFilePurpose,
|
|
1103
|
+
"status": OpenAIFileStatus,
|
|
951
1104
|
"status_details": /*#__PURE__*/S.optionalWith(S.String, {
|
|
952
1105
|
nullable: true
|
|
953
1106
|
})
|
|
954
1107
|
}) {}
|
|
955
1108
|
exports.OpenAIFile = OpenAIFile;
|
|
956
1109
|
class ListFilesResponse extends /*#__PURE__*/S.Class("ListFilesResponse")({
|
|
1110
|
+
"object": S.String,
|
|
957
1111
|
"data": /*#__PURE__*/S.Array(OpenAIFile),
|
|
958
|
-
"
|
|
1112
|
+
"first_id": S.String,
|
|
1113
|
+
"last_id": S.String,
|
|
1114
|
+
"has_more": S.Boolean
|
|
959
1115
|
}) {}
|
|
960
1116
|
exports.ListFilesResponse = ListFilesResponse;
|
|
1117
|
+
class DeleteFileResponseObject extends /*#__PURE__*/S.Literal("file") {}
|
|
1118
|
+
exports.DeleteFileResponseObject = DeleteFileResponseObject;
|
|
961
1119
|
class DeleteFileResponse extends /*#__PURE__*/S.Class("DeleteFileResponse")({
|
|
962
1120
|
"id": S.String,
|
|
963
|
-
"object":
|
|
1121
|
+
"object": DeleteFileResponseObject,
|
|
964
1122
|
"deleted": S.Boolean
|
|
965
1123
|
}) {}
|
|
966
1124
|
exports.DeleteFileResponse = DeleteFileResponse;
|
|
@@ -976,8 +1134,20 @@ class ListPaginatedFineTuningJobsParams extends /*#__PURE__*/S.Struct({
|
|
|
976
1134
|
})
|
|
977
1135
|
}) {}
|
|
978
1136
|
exports.ListPaginatedFineTuningJobsParams = ListPaginatedFineTuningJobsParams;
|
|
1137
|
+
class FineTuningJobHyperparametersBatchSize extends /*#__PURE__*/S.Literal("auto") {}
|
|
1138
|
+
exports.FineTuningJobHyperparametersBatchSize = FineTuningJobHyperparametersBatchSize;
|
|
1139
|
+
class FineTuningJobHyperparametersLearningRateMultiplier extends /*#__PURE__*/S.Literal("auto") {}
|
|
1140
|
+
exports.FineTuningJobHyperparametersLearningRateMultiplier = FineTuningJobHyperparametersLearningRateMultiplier;
|
|
1141
|
+
class FineTuningJobHyperparametersNEpochs extends /*#__PURE__*/S.Literal("auto") {}
|
|
1142
|
+
exports.FineTuningJobHyperparametersNEpochs = FineTuningJobHyperparametersNEpochs;
|
|
1143
|
+
class FineTuningJobObject extends /*#__PURE__*/S.Literal("fine_tuning.job") {}
|
|
1144
|
+
exports.FineTuningJobObject = FineTuningJobObject;
|
|
1145
|
+
class FineTuningJobStatus extends /*#__PURE__*/S.Literal("validating_files", "queued", "running", "succeeded", "failed", "cancelled") {}
|
|
1146
|
+
exports.FineTuningJobStatus = FineTuningJobStatus;
|
|
1147
|
+
class FineTuningIntegrationType extends /*#__PURE__*/S.Literal("wandb") {}
|
|
1148
|
+
exports.FineTuningIntegrationType = FineTuningIntegrationType;
|
|
979
1149
|
class FineTuningIntegration extends /*#__PURE__*/S.Struct({
|
|
980
|
-
"type":
|
|
1150
|
+
"type": FineTuningIntegrationType,
|
|
981
1151
|
"wandb": /*#__PURE__*/S.Struct({
|
|
982
1152
|
"project": S.String,
|
|
983
1153
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -992,6 +1162,76 @@ class FineTuningIntegration extends /*#__PURE__*/S.Struct({
|
|
|
992
1162
|
})
|
|
993
1163
|
}) {}
|
|
994
1164
|
exports.FineTuningIntegration = FineTuningIntegration;
|
|
1165
|
+
class FineTuneMethodType extends /*#__PURE__*/S.Literal("supervised", "dpo") {}
|
|
1166
|
+
exports.FineTuneMethodType = FineTuneMethodType;
|
|
1167
|
+
class FineTuneSupervisedMethodHyperparametersBatchSize extends /*#__PURE__*/S.Literal("auto") {}
|
|
1168
|
+
exports.FineTuneSupervisedMethodHyperparametersBatchSize = FineTuneSupervisedMethodHyperparametersBatchSize;
|
|
1169
|
+
class FineTuneSupervisedMethodHyperparametersLearningRateMultiplier extends /*#__PURE__*/S.Literal("auto") {}
|
|
1170
|
+
exports.FineTuneSupervisedMethodHyperparametersLearningRateMultiplier = FineTuneSupervisedMethodHyperparametersLearningRateMultiplier;
|
|
1171
|
+
class FineTuneSupervisedMethodHyperparametersNEpochs extends /*#__PURE__*/S.Literal("auto") {}
|
|
1172
|
+
exports.FineTuneSupervisedMethodHyperparametersNEpochs = FineTuneSupervisedMethodHyperparametersNEpochs;
|
|
1173
|
+
class FineTuneSupervisedMethod extends /*#__PURE__*/S.Struct({
|
|
1174
|
+
"hyperparameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1175
|
+
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneSupervisedMethodHyperparametersBatchSize, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(256))), {
|
|
1176
|
+
nullable: true,
|
|
1177
|
+
default: () => "auto"
|
|
1178
|
+
}),
|
|
1179
|
+
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneSupervisedMethodHyperparametersLearningRateMultiplier, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0))), {
|
|
1180
|
+
nullable: true,
|
|
1181
|
+
default: () => "auto"
|
|
1182
|
+
}),
|
|
1183
|
+
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneSupervisedMethodHyperparametersNEpochs, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50))), {
|
|
1184
|
+
nullable: true,
|
|
1185
|
+
default: () => "auto"
|
|
1186
|
+
})
|
|
1187
|
+
}), {
|
|
1188
|
+
nullable: true
|
|
1189
|
+
})
|
|
1190
|
+
}) {}
|
|
1191
|
+
exports.FineTuneSupervisedMethod = FineTuneSupervisedMethod;
|
|
1192
|
+
class FineTuneDPOMethodHyperparametersBeta extends /*#__PURE__*/S.Literal("auto") {}
|
|
1193
|
+
exports.FineTuneDPOMethodHyperparametersBeta = FineTuneDPOMethodHyperparametersBeta;
|
|
1194
|
+
class FineTuneDPOMethodHyperparametersBatchSize extends /*#__PURE__*/S.Literal("auto") {}
|
|
1195
|
+
exports.FineTuneDPOMethodHyperparametersBatchSize = FineTuneDPOMethodHyperparametersBatchSize;
|
|
1196
|
+
class FineTuneDPOMethodHyperparametersLearningRateMultiplier extends /*#__PURE__*/S.Literal("auto") {}
|
|
1197
|
+
exports.FineTuneDPOMethodHyperparametersLearningRateMultiplier = FineTuneDPOMethodHyperparametersLearningRateMultiplier;
|
|
1198
|
+
class FineTuneDPOMethodHyperparametersNEpochs extends /*#__PURE__*/S.Literal("auto") {}
|
|
1199
|
+
exports.FineTuneDPOMethodHyperparametersNEpochs = FineTuneDPOMethodHyperparametersNEpochs;
|
|
1200
|
+
class FineTuneDPOMethod extends /*#__PURE__*/S.Struct({
|
|
1201
|
+
"hyperparameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1202
|
+
"beta": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneDPOMethodHyperparametersBeta, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0), /*#__PURE__*/S.lessThanOrEqualTo(2))), {
|
|
1203
|
+
nullable: true,
|
|
1204
|
+
default: () => "auto"
|
|
1205
|
+
}),
|
|
1206
|
+
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneDPOMethodHyperparametersBatchSize, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(256))), {
|
|
1207
|
+
nullable: true,
|
|
1208
|
+
default: () => "auto"
|
|
1209
|
+
}),
|
|
1210
|
+
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneDPOMethodHyperparametersLearningRateMultiplier, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0))), {
|
|
1211
|
+
nullable: true,
|
|
1212
|
+
default: () => "auto"
|
|
1213
|
+
}),
|
|
1214
|
+
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuneDPOMethodHyperparametersNEpochs, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50))), {
|
|
1215
|
+
nullable: true,
|
|
1216
|
+
default: () => "auto"
|
|
1217
|
+
})
|
|
1218
|
+
}), {
|
|
1219
|
+
nullable: true
|
|
1220
|
+
})
|
|
1221
|
+
}) {}
|
|
1222
|
+
exports.FineTuneDPOMethod = FineTuneDPOMethod;
|
|
1223
|
+
class FineTuneMethod extends /*#__PURE__*/S.Struct({
|
|
1224
|
+
"type": /*#__PURE__*/S.optionalWith(FineTuneMethodType, {
|
|
1225
|
+
nullable: true
|
|
1226
|
+
}),
|
|
1227
|
+
"supervised": /*#__PURE__*/S.optionalWith(FineTuneSupervisedMethod, {
|
|
1228
|
+
nullable: true
|
|
1229
|
+
}),
|
|
1230
|
+
"dpo": /*#__PURE__*/S.optionalWith(FineTuneDPOMethod, {
|
|
1231
|
+
nullable: true
|
|
1232
|
+
})
|
|
1233
|
+
}) {}
|
|
1234
|
+
exports.FineTuneMethod = FineTuneMethod;
|
|
995
1235
|
class FineTuningJob extends /*#__PURE__*/S.Struct({
|
|
996
1236
|
"id": S.String,
|
|
997
1237
|
"created_at": S.Int,
|
|
@@ -1003,13 +1243,24 @@ class FineTuningJob extends /*#__PURE__*/S.Struct({
|
|
|
1003
1243
|
"fine_tuned_model": /*#__PURE__*/S.NullOr(S.String),
|
|
1004
1244
|
"finished_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
1005
1245
|
"hyperparameters": /*#__PURE__*/S.Struct({
|
|
1006
|
-
"
|
|
1246
|
+
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuningJobHyperparametersBatchSize, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(256))), {
|
|
1247
|
+
nullable: true,
|
|
1248
|
+
default: () => "auto"
|
|
1249
|
+
}),
|
|
1250
|
+
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuningJobHyperparametersLearningRateMultiplier, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0))), {
|
|
1251
|
+
nullable: true,
|
|
1252
|
+
default: () => "auto"
|
|
1253
|
+
}),
|
|
1254
|
+
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(FineTuningJobHyperparametersNEpochs, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50))), {
|
|
1255
|
+
nullable: true,
|
|
1256
|
+
default: () => "auto"
|
|
1257
|
+
})
|
|
1007
1258
|
}),
|
|
1008
1259
|
"model": S.String,
|
|
1009
|
-
"object":
|
|
1260
|
+
"object": FineTuningJobObject,
|
|
1010
1261
|
"organization_id": S.String,
|
|
1011
1262
|
"result_files": /*#__PURE__*/S.Array(S.String),
|
|
1012
|
-
"status":
|
|
1263
|
+
"status": FineTuningJobStatus,
|
|
1013
1264
|
"trained_tokens": /*#__PURE__*/S.NullOr(S.Int),
|
|
1014
1265
|
"training_file": S.String,
|
|
1015
1266
|
"validation_file": /*#__PURE__*/S.NullOr(S.String),
|
|
@@ -1019,28 +1270,43 @@ class FineTuningJob extends /*#__PURE__*/S.Struct({
|
|
|
1019
1270
|
"seed": S.Int,
|
|
1020
1271
|
"estimated_finish": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1021
1272
|
nullable: true
|
|
1273
|
+
}),
|
|
1274
|
+
"method": /*#__PURE__*/S.optionalWith(FineTuneMethod, {
|
|
1275
|
+
nullable: true
|
|
1022
1276
|
})
|
|
1023
1277
|
}) {}
|
|
1024
1278
|
exports.FineTuningJob = FineTuningJob;
|
|
1279
|
+
class ListPaginatedFineTuningJobsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1280
|
+
exports.ListPaginatedFineTuningJobsResponseObject = ListPaginatedFineTuningJobsResponseObject;
|
|
1025
1281
|
class ListPaginatedFineTuningJobsResponse extends /*#__PURE__*/S.Class("ListPaginatedFineTuningJobsResponse")({
|
|
1026
1282
|
"data": /*#__PURE__*/S.Array(FineTuningJob),
|
|
1027
1283
|
"has_more": S.Boolean,
|
|
1028
|
-
"object":
|
|
1284
|
+
"object": ListPaginatedFineTuningJobsResponseObject
|
|
1029
1285
|
}) {}
|
|
1030
1286
|
exports.ListPaginatedFineTuningJobsResponse = ListPaginatedFineTuningJobsResponse;
|
|
1287
|
+
class CreateFineTuningJobRequestModel extends /*#__PURE__*/S.Literal("babbage-002", "davinci-002", "gpt-3.5-turbo", "gpt-4o-mini") {}
|
|
1288
|
+
exports.CreateFineTuningJobRequestModel = CreateFineTuningJobRequestModel;
|
|
1289
|
+
class CreateFineTuningJobRequestHyperparametersBatchSize extends /*#__PURE__*/S.Literal("auto") {}
|
|
1290
|
+
exports.CreateFineTuningJobRequestHyperparametersBatchSize = CreateFineTuningJobRequestHyperparametersBatchSize;
|
|
1291
|
+
class CreateFineTuningJobRequestHyperparametersLearningRateMultiplier extends /*#__PURE__*/S.Literal("auto") {}
|
|
1292
|
+
exports.CreateFineTuningJobRequestHyperparametersLearningRateMultiplier = CreateFineTuningJobRequestHyperparametersLearningRateMultiplier;
|
|
1293
|
+
class CreateFineTuningJobRequestHyperparametersNEpochs extends /*#__PURE__*/S.Literal("auto") {}
|
|
1294
|
+
exports.CreateFineTuningJobRequestHyperparametersNEpochs = CreateFineTuningJobRequestHyperparametersNEpochs;
|
|
1295
|
+
class CreateFineTuningJobRequestIntegrationsType extends /*#__PURE__*/S.Literal("wandb") {}
|
|
1296
|
+
exports.CreateFineTuningJobRequestIntegrationsType = CreateFineTuningJobRequestIntegrationsType;
|
|
1031
1297
|
class CreateFineTuningJobRequest extends /*#__PURE__*/S.Class("CreateFineTuningJobRequest")({
|
|
1032
|
-
"model": /*#__PURE__*/S.Union(S.String,
|
|
1298
|
+
"model": /*#__PURE__*/S.Union(S.String, CreateFineTuningJobRequestModel),
|
|
1033
1299
|
"training_file": S.String,
|
|
1034
1300
|
"hyperparameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1035
|
-
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(
|
|
1301
|
+
"batch_size": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(CreateFineTuningJobRequestHyperparametersBatchSize, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(256))), {
|
|
1036
1302
|
nullable: true,
|
|
1037
1303
|
default: () => "auto"
|
|
1038
1304
|
}),
|
|
1039
|
-
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(
|
|
1305
|
+
"learning_rate_multiplier": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(CreateFineTuningJobRequestHyperparametersLearningRateMultiplier, /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThan(0))), {
|
|
1040
1306
|
nullable: true,
|
|
1041
1307
|
default: () => "auto"
|
|
1042
1308
|
}),
|
|
1043
|
-
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(
|
|
1309
|
+
"n_epochs": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(CreateFineTuningJobRequestHyperparametersNEpochs, /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(50))), {
|
|
1044
1310
|
nullable: true,
|
|
1045
1311
|
default: () => "auto"
|
|
1046
1312
|
})
|
|
@@ -1054,7 +1320,7 @@ class CreateFineTuningJobRequest extends /*#__PURE__*/S.Class("CreateFineTuningJ
|
|
|
1054
1320
|
nullable: true
|
|
1055
1321
|
}),
|
|
1056
1322
|
"integrations": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
1057
|
-
"type":
|
|
1323
|
+
"type": CreateFineTuningJobRequestIntegrationsType,
|
|
1058
1324
|
"wandb": /*#__PURE__*/S.Struct({
|
|
1059
1325
|
"project": S.String,
|
|
1060
1326
|
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -1072,6 +1338,9 @@ class CreateFineTuningJobRequest extends /*#__PURE__*/S.Class("CreateFineTuningJ
|
|
|
1072
1338
|
}),
|
|
1073
1339
|
"seed": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(2147483647)), {
|
|
1074
1340
|
nullable: true
|
|
1341
|
+
}),
|
|
1342
|
+
"method": /*#__PURE__*/S.optionalWith(FineTuneMethod, {
|
|
1343
|
+
nullable: true
|
|
1075
1344
|
})
|
|
1076
1345
|
}) {}
|
|
1077
1346
|
exports.CreateFineTuningJobRequest = CreateFineTuningJobRequest;
|
|
@@ -1085,6 +1354,8 @@ class ListFineTuningJobCheckpointsParams extends /*#__PURE__*/S.Struct({
|
|
|
1085
1354
|
})
|
|
1086
1355
|
}) {}
|
|
1087
1356
|
exports.ListFineTuningJobCheckpointsParams = ListFineTuningJobCheckpointsParams;
|
|
1357
|
+
class FineTuningJobCheckpointObject extends /*#__PURE__*/S.Literal("fine_tuning.job.checkpoint") {}
|
|
1358
|
+
exports.FineTuningJobCheckpointObject = FineTuningJobCheckpointObject;
|
|
1088
1359
|
class FineTuningJobCheckpoint extends /*#__PURE__*/S.Struct({
|
|
1089
1360
|
"id": S.String,
|
|
1090
1361
|
"created_at": S.Int,
|
|
@@ -1114,12 +1385,14 @@ class FineTuningJobCheckpoint extends /*#__PURE__*/S.Struct({
|
|
|
1114
1385
|
})
|
|
1115
1386
|
}),
|
|
1116
1387
|
"fine_tuning_job_id": S.String,
|
|
1117
|
-
"object":
|
|
1388
|
+
"object": FineTuningJobCheckpointObject
|
|
1118
1389
|
}) {}
|
|
1119
1390
|
exports.FineTuningJobCheckpoint = FineTuningJobCheckpoint;
|
|
1391
|
+
class ListFineTuningJobCheckpointsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1392
|
+
exports.ListFineTuningJobCheckpointsResponseObject = ListFineTuningJobCheckpointsResponseObject;
|
|
1120
1393
|
class ListFineTuningJobCheckpointsResponse extends /*#__PURE__*/S.Class("ListFineTuningJobCheckpointsResponse")({
|
|
1121
1394
|
"data": /*#__PURE__*/S.Array(FineTuningJobCheckpoint),
|
|
1122
|
-
"object":
|
|
1395
|
+
"object": ListFineTuningJobCheckpointsResponseObject,
|
|
1123
1396
|
"first_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1124
1397
|
nullable: true
|
|
1125
1398
|
}),
|
|
@@ -1139,17 +1412,34 @@ class ListFineTuningEventsParams extends /*#__PURE__*/S.Struct({
|
|
|
1139
1412
|
})
|
|
1140
1413
|
}) {}
|
|
1141
1414
|
exports.ListFineTuningEventsParams = ListFineTuningEventsParams;
|
|
1415
|
+
class FineTuningJobEventObject extends /*#__PURE__*/S.Literal("fine_tuning.job.event") {}
|
|
1416
|
+
exports.FineTuningJobEventObject = FineTuningJobEventObject;
|
|
1417
|
+
class FineTuningJobEventLevel extends /*#__PURE__*/S.Literal("info", "warn", "error") {}
|
|
1418
|
+
exports.FineTuningJobEventLevel = FineTuningJobEventLevel;
|
|
1419
|
+
class FineTuningJobEventType extends /*#__PURE__*/S.Literal("message", "metrics") {}
|
|
1420
|
+
exports.FineTuningJobEventType = FineTuningJobEventType;
|
|
1142
1421
|
class FineTuningJobEvent extends /*#__PURE__*/S.Struct({
|
|
1422
|
+
"object": FineTuningJobEventObject,
|
|
1143
1423
|
"id": S.String,
|
|
1144
1424
|
"created_at": S.Int,
|
|
1145
|
-
"level":
|
|
1425
|
+
"level": FineTuningJobEventLevel,
|
|
1146
1426
|
"message": S.String,
|
|
1147
|
-
"
|
|
1427
|
+
"type": /*#__PURE__*/S.optionalWith(FineTuningJobEventType, {
|
|
1428
|
+
nullable: true
|
|
1429
|
+
}),
|
|
1430
|
+
"data": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
1431
|
+
key: S.String,
|
|
1432
|
+
value: S.Unknown
|
|
1433
|
+
}), {
|
|
1434
|
+
nullable: true
|
|
1435
|
+
})
|
|
1148
1436
|
}) {}
|
|
1149
1437
|
exports.FineTuningJobEvent = FineTuningJobEvent;
|
|
1438
|
+
class ListFineTuningJobEventsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1439
|
+
exports.ListFineTuningJobEventsResponseObject = ListFineTuningJobEventsResponseObject;
|
|
1150
1440
|
class ListFineTuningJobEventsResponse extends /*#__PURE__*/S.Class("ListFineTuningJobEventsResponse")({
|
|
1151
1441
|
"data": /*#__PURE__*/S.Array(FineTuningJobEvent),
|
|
1152
|
-
"object":
|
|
1442
|
+
"object": ListFineTuningJobEventsResponseObject
|
|
1153
1443
|
}) {}
|
|
1154
1444
|
exports.ListFineTuningJobEventsResponse = ListFineTuningJobEventsResponse;
|
|
1155
1445
|
class Image extends /*#__PURE__*/S.Struct({
|
|
@@ -1169,9 +1459,19 @@ class ImagesResponse extends /*#__PURE__*/S.Class("ImagesResponse")({
|
|
|
1169
1459
|
"data": /*#__PURE__*/S.Array(Image)
|
|
1170
1460
|
}) {}
|
|
1171
1461
|
exports.ImagesResponse = ImagesResponse;
|
|
1462
|
+
class CreateImageRequestModel extends /*#__PURE__*/S.Literal("dall-e-2", "dall-e-3") {}
|
|
1463
|
+
exports.CreateImageRequestModel = CreateImageRequestModel;
|
|
1464
|
+
class CreateImageRequestQuality extends /*#__PURE__*/S.Literal("standard", "hd") {}
|
|
1465
|
+
exports.CreateImageRequestQuality = CreateImageRequestQuality;
|
|
1466
|
+
class CreateImageRequestResponseFormat extends /*#__PURE__*/S.Literal("url", "b64_json") {}
|
|
1467
|
+
exports.CreateImageRequestResponseFormat = CreateImageRequestResponseFormat;
|
|
1468
|
+
class CreateImageRequestSize extends /*#__PURE__*/S.Literal("256x256", "512x512", "1024x1024", "1792x1024", "1024x1792") {}
|
|
1469
|
+
exports.CreateImageRequestSize = CreateImageRequestSize;
|
|
1470
|
+
class CreateImageRequestStyle extends /*#__PURE__*/S.Literal("vivid", "natural") {}
|
|
1471
|
+
exports.CreateImageRequestStyle = CreateImageRequestStyle;
|
|
1172
1472
|
class CreateImageRequest extends /*#__PURE__*/S.Class("CreateImageRequest")({
|
|
1173
1473
|
"prompt": S.String,
|
|
1174
|
-
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String,
|
|
1474
|
+
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, CreateImageRequestModel), {
|
|
1175
1475
|
nullable: true,
|
|
1176
1476
|
default: () => "dall-e-2"
|
|
1177
1477
|
}),
|
|
@@ -1179,19 +1479,19 @@ class CreateImageRequest extends /*#__PURE__*/S.Class("CreateImageRequest")({
|
|
|
1179
1479
|
nullable: true,
|
|
1180
1480
|
default: () => 1
|
|
1181
1481
|
}),
|
|
1182
|
-
"quality": /*#__PURE__*/S.optionalWith(
|
|
1482
|
+
"quality": /*#__PURE__*/S.optionalWith(CreateImageRequestQuality, {
|
|
1183
1483
|
nullable: true,
|
|
1184
1484
|
default: () => "standard"
|
|
1185
1485
|
}),
|
|
1186
|
-
"response_format": /*#__PURE__*/S.optionalWith(
|
|
1486
|
+
"response_format": /*#__PURE__*/S.optionalWith(CreateImageRequestResponseFormat, {
|
|
1187
1487
|
nullable: true,
|
|
1188
1488
|
default: () => "url"
|
|
1189
1489
|
}),
|
|
1190
|
-
"size": /*#__PURE__*/S.optionalWith(
|
|
1490
|
+
"size": /*#__PURE__*/S.optionalWith(CreateImageRequestSize, {
|
|
1191
1491
|
nullable: true,
|
|
1192
1492
|
default: () => "1024x1024"
|
|
1193
1493
|
}),
|
|
1194
|
-
"style": /*#__PURE__*/S.optionalWith(
|
|
1494
|
+
"style": /*#__PURE__*/S.optionalWith(CreateImageRequestStyle, {
|
|
1195
1495
|
nullable: true,
|
|
1196
1496
|
default: () => "vivid"
|
|
1197
1497
|
}),
|
|
@@ -1200,15 +1500,19 @@ class CreateImageRequest extends /*#__PURE__*/S.Class("CreateImageRequest")({
|
|
|
1200
1500
|
})
|
|
1201
1501
|
}) {}
|
|
1202
1502
|
exports.CreateImageRequest = CreateImageRequest;
|
|
1503
|
+
class ListModelsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1504
|
+
exports.ListModelsResponseObject = ListModelsResponseObject;
|
|
1505
|
+
class ModelObject extends /*#__PURE__*/S.Literal("model") {}
|
|
1506
|
+
exports.ModelObject = ModelObject;
|
|
1203
1507
|
class Model extends /*#__PURE__*/S.Struct({
|
|
1204
1508
|
"id": S.String,
|
|
1205
1509
|
"created": S.Int,
|
|
1206
|
-
"object":
|
|
1510
|
+
"object": ModelObject,
|
|
1207
1511
|
"owned_by": S.String
|
|
1208
1512
|
}) {}
|
|
1209
1513
|
exports.Model = Model;
|
|
1210
1514
|
class ListModelsResponse extends /*#__PURE__*/S.Class("ListModelsResponse")({
|
|
1211
|
-
"object":
|
|
1515
|
+
"object": ListModelsResponseObject,
|
|
1212
1516
|
"data": /*#__PURE__*/S.Array(Model)
|
|
1213
1517
|
}) {}
|
|
1214
1518
|
exports.ListModelsResponse = ListModelsResponse;
|
|
@@ -1218,22 +1522,52 @@ class DeleteModelResponse extends /*#__PURE__*/S.Class("DeleteModelResponse")({
|
|
|
1218
1522
|
"object": S.String
|
|
1219
1523
|
}) {}
|
|
1220
1524
|
exports.DeleteModelResponse = DeleteModelResponse;
|
|
1525
|
+
class CreateModerationRequestInputType extends /*#__PURE__*/S.Literal("text") {}
|
|
1526
|
+
exports.CreateModerationRequestInputType = CreateModerationRequestInputType;
|
|
1527
|
+
class CreateModerationRequestModel extends /*#__PURE__*/S.Literal("omni-moderation-latest", "omni-moderation-2024-09-26", "text-moderation-latest", "text-moderation-stable") {}
|
|
1528
|
+
exports.CreateModerationRequestModel = CreateModerationRequestModel;
|
|
1221
1529
|
class CreateModerationRequest extends /*#__PURE__*/S.Class("CreateModerationRequest")({
|
|
1222
1530
|
"input": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.Array(S.String), /*#__PURE__*/S.Array( /*#__PURE__*/S.Union( /*#__PURE__*/S.Struct({
|
|
1223
|
-
"type":
|
|
1531
|
+
"type": CreateModerationRequestInputType,
|
|
1224
1532
|
"image_url": /*#__PURE__*/S.Struct({
|
|
1225
1533
|
"url": S.String
|
|
1226
1534
|
})
|
|
1227
1535
|
}), /*#__PURE__*/S.Struct({
|
|
1228
|
-
"type":
|
|
1536
|
+
"type": CreateModerationRequestInputType,
|
|
1229
1537
|
"text": S.String
|
|
1230
1538
|
})))),
|
|
1231
|
-
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String,
|
|
1539
|
+
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, CreateModerationRequestModel), {
|
|
1232
1540
|
nullable: true,
|
|
1233
1541
|
default: () => "omni-moderation-latest"
|
|
1234
1542
|
})
|
|
1235
1543
|
}) {}
|
|
1236
1544
|
exports.CreateModerationRequest = CreateModerationRequest;
|
|
1545
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesHate extends /*#__PURE__*/S.Literal("text") {}
|
|
1546
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesHate = CreateModerationResponseResultsCategoryAppliedInputTypesHate;
|
|
1547
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesHateThreatening extends /*#__PURE__*/S.Literal("text") {}
|
|
1548
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesHateThreatening = CreateModerationResponseResultsCategoryAppliedInputTypesHateThreatening;
|
|
1549
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesHarassment extends /*#__PURE__*/S.Literal("text") {}
|
|
1550
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesHarassment = CreateModerationResponseResultsCategoryAppliedInputTypesHarassment;
|
|
1551
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesHarassmentThreatening extends /*#__PURE__*/S.Literal("text") {}
|
|
1552
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesHarassmentThreatening = CreateModerationResponseResultsCategoryAppliedInputTypesHarassmentThreatening;
|
|
1553
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesIllicit extends /*#__PURE__*/S.Literal("text") {}
|
|
1554
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesIllicit = CreateModerationResponseResultsCategoryAppliedInputTypesIllicit;
|
|
1555
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesIllicitViolent extends /*#__PURE__*/S.Literal("text") {}
|
|
1556
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesIllicitViolent = CreateModerationResponseResultsCategoryAppliedInputTypesIllicitViolent;
|
|
1557
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarm extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1558
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarm = CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarm;
|
|
1559
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmIntent extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1560
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmIntent = CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmIntent;
|
|
1561
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmInstructions extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1562
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmInstructions = CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmInstructions;
|
|
1563
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesSexual extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1564
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesSexual = CreateModerationResponseResultsCategoryAppliedInputTypesSexual;
|
|
1565
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesSexualMinors extends /*#__PURE__*/S.Literal("text") {}
|
|
1566
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesSexualMinors = CreateModerationResponseResultsCategoryAppliedInputTypesSexualMinors;
|
|
1567
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesViolence extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1568
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesViolence = CreateModerationResponseResultsCategoryAppliedInputTypesViolence;
|
|
1569
|
+
class CreateModerationResponseResultsCategoryAppliedInputTypesViolenceGraphic extends /*#__PURE__*/S.Literal("text", "image") {}
|
|
1570
|
+
exports.CreateModerationResponseResultsCategoryAppliedInputTypesViolenceGraphic = CreateModerationResponseResultsCategoryAppliedInputTypesViolenceGraphic;
|
|
1237
1571
|
class CreateModerationResponse extends /*#__PURE__*/S.Class("CreateModerationResponse")({
|
|
1238
1572
|
"id": S.String,
|
|
1239
1573
|
"model": S.String,
|
|
@@ -1270,24 +1604,114 @@ class CreateModerationResponse extends /*#__PURE__*/S.Class("CreateModerationRes
|
|
|
1270
1604
|
"violence/graphic": S.Number
|
|
1271
1605
|
}),
|
|
1272
1606
|
"category_applied_input_types": /*#__PURE__*/S.Struct({
|
|
1273
|
-
"hate": /*#__PURE__*/S.Array(
|
|
1274
|
-
"hate/threatening": /*#__PURE__*/S.Array(
|
|
1275
|
-
"harassment": /*#__PURE__*/S.Array(
|
|
1276
|
-
"harassment/threatening": /*#__PURE__*/S.Array(
|
|
1277
|
-
"illicit": /*#__PURE__*/S.Array(
|
|
1278
|
-
"illicit/violent": /*#__PURE__*/S.Array(
|
|
1279
|
-
"self-harm": /*#__PURE__*/S.Array(
|
|
1280
|
-
"self-harm/intent": /*#__PURE__*/S.Array(
|
|
1281
|
-
"self-harm/instructions": /*#__PURE__*/S.Array(
|
|
1282
|
-
"sexual": /*#__PURE__*/S.Array(
|
|
1283
|
-
"sexual/minors": /*#__PURE__*/S.Array(
|
|
1284
|
-
"violence": /*#__PURE__*/S.Array(
|
|
1285
|
-
"violence/graphic": /*#__PURE__*/S.Array(
|
|
1607
|
+
"hate": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesHate),
|
|
1608
|
+
"hate/threatening": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesHateThreatening),
|
|
1609
|
+
"harassment": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesHarassment),
|
|
1610
|
+
"harassment/threatening": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesHarassmentThreatening),
|
|
1611
|
+
"illicit": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesIllicit),
|
|
1612
|
+
"illicit/violent": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesIllicitViolent),
|
|
1613
|
+
"self-harm": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarm),
|
|
1614
|
+
"self-harm/intent": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmIntent),
|
|
1615
|
+
"self-harm/instructions": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSelfHarmInstructions),
|
|
1616
|
+
"sexual": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSexual),
|
|
1617
|
+
"sexual/minors": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesSexualMinors),
|
|
1618
|
+
"violence": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesViolence),
|
|
1619
|
+
"violence/graphic": /*#__PURE__*/S.Array(CreateModerationResponseResultsCategoryAppliedInputTypesViolenceGraphic)
|
|
1286
1620
|
})
|
|
1287
1621
|
}))
|
|
1288
1622
|
}) {}
|
|
1289
1623
|
exports.CreateModerationResponse = CreateModerationResponse;
|
|
1290
|
-
class
|
|
1624
|
+
class AdminApiKeysListParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
1625
|
+
exports.AdminApiKeysListParamsOrder = AdminApiKeysListParamsOrder;
|
|
1626
|
+
class AdminApiKeysListParams extends /*#__PURE__*/S.Struct({
|
|
1627
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1628
|
+
nullable: true
|
|
1629
|
+
}),
|
|
1630
|
+
"order": /*#__PURE__*/S.optionalWith(AdminApiKeysListParamsOrder, {
|
|
1631
|
+
nullable: true,
|
|
1632
|
+
default: () => "asc"
|
|
1633
|
+
}),
|
|
1634
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1635
|
+
nullable: true,
|
|
1636
|
+
default: () => 20
|
|
1637
|
+
})
|
|
1638
|
+
}) {}
|
|
1639
|
+
exports.AdminApiKeysListParams = AdminApiKeysListParams;
|
|
1640
|
+
class AdminApiKey extends /*#__PURE__*/S.Struct({
|
|
1641
|
+
"object": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1642
|
+
nullable: true
|
|
1643
|
+
}),
|
|
1644
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1645
|
+
nullable: true
|
|
1646
|
+
}),
|
|
1647
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1648
|
+
nullable: true
|
|
1649
|
+
}),
|
|
1650
|
+
"redacted_value": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1651
|
+
nullable: true
|
|
1652
|
+
}),
|
|
1653
|
+
"value": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1654
|
+
nullable: true
|
|
1655
|
+
}),
|
|
1656
|
+
"created_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1657
|
+
nullable: true
|
|
1658
|
+
}),
|
|
1659
|
+
"owner": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1660
|
+
"type": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1661
|
+
nullable: true
|
|
1662
|
+
}),
|
|
1663
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1664
|
+
nullable: true
|
|
1665
|
+
}),
|
|
1666
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1667
|
+
nullable: true
|
|
1668
|
+
}),
|
|
1669
|
+
"created_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1670
|
+
nullable: true
|
|
1671
|
+
}),
|
|
1672
|
+
"role": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1673
|
+
nullable: true
|
|
1674
|
+
})
|
|
1675
|
+
}), {
|
|
1676
|
+
nullable: true
|
|
1677
|
+
})
|
|
1678
|
+
}) {}
|
|
1679
|
+
exports.AdminApiKey = AdminApiKey;
|
|
1680
|
+
class ApiKeyList extends /*#__PURE__*/S.Class("ApiKeyList")({
|
|
1681
|
+
"object": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1682
|
+
nullable: true
|
|
1683
|
+
}),
|
|
1684
|
+
"data": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(AdminApiKey), {
|
|
1685
|
+
nullable: true
|
|
1686
|
+
}),
|
|
1687
|
+
"has_more": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1688
|
+
nullable: true
|
|
1689
|
+
}),
|
|
1690
|
+
"first_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1691
|
+
nullable: true
|
|
1692
|
+
}),
|
|
1693
|
+
"last_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1694
|
+
nullable: true
|
|
1695
|
+
})
|
|
1696
|
+
}) {}
|
|
1697
|
+
exports.ApiKeyList = ApiKeyList;
|
|
1698
|
+
class AdminApiKeysCreateRequest extends /*#__PURE__*/S.Class("AdminApiKeysCreateRequest")({
|
|
1699
|
+
"name": S.String
|
|
1700
|
+
}) {}
|
|
1701
|
+
exports.AdminApiKeysCreateRequest = AdminApiKeysCreateRequest;
|
|
1702
|
+
class AdminApiKeysDelete200 extends /*#__PURE__*/S.Struct({
|
|
1703
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1704
|
+
nullable: true
|
|
1705
|
+
}),
|
|
1706
|
+
"object": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1707
|
+
nullable: true
|
|
1708
|
+
}),
|
|
1709
|
+
"deleted": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1710
|
+
nullable: true
|
|
1711
|
+
})
|
|
1712
|
+
}) {}
|
|
1713
|
+
exports.AdminApiKeysDelete200 = AdminApiKeysDelete200;
|
|
1714
|
+
class AuditLogEventType extends /*#__PURE__*/S.Literal("api_key.created", "api_key.updated", "api_key.deleted", "invite.sent", "invite.accepted", "invite.deleted", "login.succeeded", "login.failed", "logout.succeeded", "logout.failed", "organization.updated", "project.created", "project.updated", "project.archived", "service_account.created", "service_account.updated", "service_account.deleted", "rate_limit.updated", "rate_limit.deleted", "user.added", "user.updated", "user.deleted") {}
|
|
1291
1715
|
exports.AuditLogEventType = AuditLogEventType;
|
|
1292
1716
|
class ListAuditLogsParams extends /*#__PURE__*/S.Struct({
|
|
1293
1717
|
"effective_at[gt]": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
@@ -1329,6 +1753,10 @@ class ListAuditLogsParams extends /*#__PURE__*/S.Struct({
|
|
|
1329
1753
|
})
|
|
1330
1754
|
}) {}
|
|
1331
1755
|
exports.ListAuditLogsParams = ListAuditLogsParams;
|
|
1756
|
+
class ListAuditLogsResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
1757
|
+
exports.ListAuditLogsResponseObject = ListAuditLogsResponseObject;
|
|
1758
|
+
class AuditLogActorType extends /*#__PURE__*/S.Literal("session", "api_key") {}
|
|
1759
|
+
exports.AuditLogActorType = AuditLogActorType;
|
|
1332
1760
|
class AuditLogActorUser extends /*#__PURE__*/S.Struct({
|
|
1333
1761
|
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1334
1762
|
nullable: true
|
|
@@ -1347,6 +1775,8 @@ class AuditLogActorSession extends /*#__PURE__*/S.Struct({
|
|
|
1347
1775
|
})
|
|
1348
1776
|
}) {}
|
|
1349
1777
|
exports.AuditLogActorSession = AuditLogActorSession;
|
|
1778
|
+
class AuditLogActorApiKeyType extends /*#__PURE__*/S.Literal("user", "service_account") {}
|
|
1779
|
+
exports.AuditLogActorApiKeyType = AuditLogActorApiKeyType;
|
|
1350
1780
|
class AuditLogActorServiceAccount extends /*#__PURE__*/S.Struct({
|
|
1351
1781
|
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1352
1782
|
nullable: true
|
|
@@ -1357,7 +1787,7 @@ class AuditLogActorApiKey extends /*#__PURE__*/S.Struct({
|
|
|
1357
1787
|
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1358
1788
|
nullable: true
|
|
1359
1789
|
}),
|
|
1360
|
-
"type": /*#__PURE__*/S.optionalWith(
|
|
1790
|
+
"type": /*#__PURE__*/S.optionalWith(AuditLogActorApiKeyType, {
|
|
1361
1791
|
nullable: true
|
|
1362
1792
|
}),
|
|
1363
1793
|
"user": /*#__PURE__*/S.optionalWith(AuditLogActorUser, {
|
|
@@ -1369,19 +1799,13 @@ class AuditLogActorApiKey extends /*#__PURE__*/S.Struct({
|
|
|
1369
1799
|
}) {}
|
|
1370
1800
|
exports.AuditLogActorApiKey = AuditLogActorApiKey;
|
|
1371
1801
|
class AuditLogActor extends /*#__PURE__*/S.Struct({
|
|
1372
|
-
"type": /*#__PURE__*/S.optionalWith(
|
|
1802
|
+
"type": /*#__PURE__*/S.optionalWith(AuditLogActorType, {
|
|
1373
1803
|
nullable: true
|
|
1374
1804
|
}),
|
|
1375
|
-
"session": /*#__PURE__*/S.optionalWith(
|
|
1376
|
-
key: S.String,
|
|
1377
|
-
value: S.Unknown
|
|
1378
|
-
}), {
|
|
1805
|
+
"session": /*#__PURE__*/S.optionalWith(AuditLogActorSession, {
|
|
1379
1806
|
nullable: true
|
|
1380
1807
|
}),
|
|
1381
|
-
"api_key": /*#__PURE__*/S.optionalWith(
|
|
1382
|
-
key: S.String,
|
|
1383
|
-
value: S.Unknown
|
|
1384
|
-
}), {
|
|
1808
|
+
"api_key": /*#__PURE__*/S.optionalWith(AuditLogActorApiKey, {
|
|
1385
1809
|
nullable: true
|
|
1386
1810
|
})
|
|
1387
1811
|
}) {}
|
|
@@ -1555,6 +1979,42 @@ class AuditLog extends /*#__PURE__*/S.Struct({
|
|
|
1555
1979
|
}), {
|
|
1556
1980
|
nullable: true
|
|
1557
1981
|
}),
|
|
1982
|
+
"rate_limit.updated": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1983
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1984
|
+
nullable: true
|
|
1985
|
+
}),
|
|
1986
|
+
"changes_requested": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1987
|
+
"max_requests_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1988
|
+
nullable: true
|
|
1989
|
+
}),
|
|
1990
|
+
"max_tokens_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1991
|
+
nullable: true
|
|
1992
|
+
}),
|
|
1993
|
+
"max_images_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1994
|
+
nullable: true
|
|
1995
|
+
}),
|
|
1996
|
+
"max_audio_megabytes_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1997
|
+
nullable: true
|
|
1998
|
+
}),
|
|
1999
|
+
"max_requests_per_1_day": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2000
|
+
nullable: true
|
|
2001
|
+
}),
|
|
2002
|
+
"batch_1_day_max_input_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2003
|
+
nullable: true
|
|
2004
|
+
})
|
|
2005
|
+
}), {
|
|
2006
|
+
nullable: true
|
|
2007
|
+
})
|
|
2008
|
+
}), {
|
|
2009
|
+
nullable: true
|
|
2010
|
+
}),
|
|
2011
|
+
"rate_limit.deleted": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
2012
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2013
|
+
nullable: true
|
|
2014
|
+
})
|
|
2015
|
+
}), {
|
|
2016
|
+
nullable: true
|
|
2017
|
+
}),
|
|
1558
2018
|
"service_account.created": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
1559
2019
|
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1560
2020
|
nullable: true
|
|
@@ -1628,89 +2088,354 @@ class AuditLog extends /*#__PURE__*/S.Struct({
|
|
|
1628
2088
|
}) {}
|
|
1629
2089
|
exports.AuditLog = AuditLog;
|
|
1630
2090
|
class ListAuditLogsResponse extends /*#__PURE__*/S.Class("ListAuditLogsResponse")({
|
|
1631
|
-
"object":
|
|
2091
|
+
"object": ListAuditLogsResponseObject,
|
|
1632
2092
|
"data": /*#__PURE__*/S.Array(AuditLog),
|
|
1633
2093
|
"first_id": S.String,
|
|
1634
2094
|
"last_id": S.String,
|
|
1635
2095
|
"has_more": S.Boolean
|
|
1636
2096
|
}) {}
|
|
1637
2097
|
exports.ListAuditLogsResponse = ListAuditLogsResponse;
|
|
1638
|
-
class
|
|
2098
|
+
class UsageCostsParamsBucketWidth extends /*#__PURE__*/S.Literal("1d") {}
|
|
2099
|
+
exports.UsageCostsParamsBucketWidth = UsageCostsParamsBucketWidth;
|
|
2100
|
+
class UsageCostsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "line_item") {}
|
|
2101
|
+
exports.UsageCostsParamsGroupBy = UsageCostsParamsGroupBy;
|
|
2102
|
+
class UsageCostsParams extends /*#__PURE__*/S.Struct({
|
|
2103
|
+
"start_time": S.Int,
|
|
2104
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2105
|
+
nullable: true
|
|
2106
|
+
}),
|
|
2107
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageCostsParamsBucketWidth, {
|
|
2108
|
+
nullable: true,
|
|
2109
|
+
default: () => "1d"
|
|
2110
|
+
}),
|
|
2111
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2112
|
+
nullable: true
|
|
2113
|
+
}),
|
|
2114
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageCostsParamsGroupBy), {
|
|
2115
|
+
nullable: true
|
|
2116
|
+
}),
|
|
1639
2117
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1640
2118
|
nullable: true,
|
|
1641
|
-
default: () =>
|
|
2119
|
+
default: () => 7
|
|
1642
2120
|
}),
|
|
1643
|
-
"
|
|
2121
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1644
2122
|
nullable: true
|
|
1645
2123
|
})
|
|
1646
2124
|
}) {}
|
|
1647
|
-
exports.
|
|
1648
|
-
class
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
"
|
|
1656
|
-
"
|
|
2125
|
+
exports.UsageCostsParams = UsageCostsParams;
|
|
2126
|
+
class UsageResponseObject extends /*#__PURE__*/S.Literal("page") {}
|
|
2127
|
+
exports.UsageResponseObject = UsageResponseObject;
|
|
2128
|
+
class UsageTimeBucketObject extends /*#__PURE__*/S.Literal("bucket") {}
|
|
2129
|
+
exports.UsageTimeBucketObject = UsageTimeBucketObject;
|
|
2130
|
+
class UsageCompletionsResultObject extends /*#__PURE__*/S.Literal("organization.usage.completions.result") {}
|
|
2131
|
+
exports.UsageCompletionsResultObject = UsageCompletionsResultObject;
|
|
2132
|
+
class UsageCompletionsResult extends /*#__PURE__*/S.Struct({
|
|
2133
|
+
"object": UsageCompletionsResultObject,
|
|
2134
|
+
"input_tokens": S.Int,
|
|
2135
|
+
"input_cached_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2136
|
+
nullable: true
|
|
2137
|
+
}),
|
|
2138
|
+
"output_tokens": S.Int,
|
|
2139
|
+
"input_audio_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2140
|
+
nullable: true
|
|
2141
|
+
}),
|
|
2142
|
+
"output_audio_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2143
|
+
nullable: true
|
|
2144
|
+
}),
|
|
2145
|
+
"num_model_requests": S.Int,
|
|
2146
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2147
|
+
nullable: true
|
|
2148
|
+
}),
|
|
2149
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2150
|
+
nullable: true
|
|
2151
|
+
}),
|
|
2152
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2153
|
+
nullable: true
|
|
2154
|
+
}),
|
|
2155
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2156
|
+
nullable: true
|
|
2157
|
+
}),
|
|
2158
|
+
"batch": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
1657
2159
|
nullable: true
|
|
1658
2160
|
})
|
|
1659
2161
|
}) {}
|
|
1660
|
-
exports.
|
|
1661
|
-
class
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
"
|
|
2162
|
+
exports.UsageCompletionsResult = UsageCompletionsResult;
|
|
2163
|
+
class UsageEmbeddingsResultObject extends /*#__PURE__*/S.Literal("organization.usage.embeddings.result") {}
|
|
2164
|
+
exports.UsageEmbeddingsResultObject = UsageEmbeddingsResultObject;
|
|
2165
|
+
class UsageEmbeddingsResult extends /*#__PURE__*/S.Struct({
|
|
2166
|
+
"object": UsageEmbeddingsResultObject,
|
|
2167
|
+
"input_tokens": S.Int,
|
|
2168
|
+
"num_model_requests": S.Int,
|
|
2169
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1665
2170
|
nullable: true
|
|
1666
2171
|
}),
|
|
1667
|
-
"
|
|
2172
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1668
2173
|
nullable: true
|
|
1669
2174
|
}),
|
|
1670
|
-
"
|
|
2175
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2176
|
+
nullable: true
|
|
2177
|
+
}),
|
|
2178
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1671
2179
|
nullable: true
|
|
1672
2180
|
})
|
|
1673
2181
|
}) {}
|
|
1674
|
-
exports.
|
|
1675
|
-
class
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
"
|
|
1682
|
-
|
|
1683
|
-
"deleted": S.Boolean
|
|
1684
|
-
}) {}
|
|
1685
|
-
exports.InviteDeleteResponse = InviteDeleteResponse;
|
|
1686
|
-
class ListProjectsParams extends /*#__PURE__*/S.Struct({
|
|
1687
|
-
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1688
|
-
nullable: true,
|
|
1689
|
-
default: () => 20
|
|
2182
|
+
exports.UsageEmbeddingsResult = UsageEmbeddingsResult;
|
|
2183
|
+
class UsageModerationsResultObject extends /*#__PURE__*/S.Literal("organization.usage.moderations.result") {}
|
|
2184
|
+
exports.UsageModerationsResultObject = UsageModerationsResultObject;
|
|
2185
|
+
class UsageModerationsResult extends /*#__PURE__*/S.Struct({
|
|
2186
|
+
"object": UsageModerationsResultObject,
|
|
2187
|
+
"input_tokens": S.Int,
|
|
2188
|
+
"num_model_requests": S.Int,
|
|
2189
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2190
|
+
nullable: true
|
|
1690
2191
|
}),
|
|
1691
|
-
"
|
|
2192
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1692
2193
|
nullable: true
|
|
1693
2194
|
}),
|
|
1694
|
-
"
|
|
1695
|
-
nullable: true
|
|
1696
|
-
|
|
2195
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2196
|
+
nullable: true
|
|
2197
|
+
}),
|
|
2198
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2199
|
+
nullable: true
|
|
1697
2200
|
})
|
|
1698
2201
|
}) {}
|
|
1699
|
-
exports.
|
|
1700
|
-
class
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
"
|
|
1704
|
-
"
|
|
1705
|
-
"
|
|
2202
|
+
exports.UsageModerationsResult = UsageModerationsResult;
|
|
2203
|
+
class UsageImagesResultObject extends /*#__PURE__*/S.Literal("organization.usage.images.result") {}
|
|
2204
|
+
exports.UsageImagesResultObject = UsageImagesResultObject;
|
|
2205
|
+
class UsageImagesResult extends /*#__PURE__*/S.Struct({
|
|
2206
|
+
"object": UsageImagesResultObject,
|
|
2207
|
+
"images": S.Int,
|
|
2208
|
+
"num_model_requests": S.Int,
|
|
2209
|
+
"source": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1706
2210
|
nullable: true
|
|
1707
2211
|
}),
|
|
1708
|
-
"
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
2212
|
+
"size": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2213
|
+
nullable: true
|
|
2214
|
+
}),
|
|
2215
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2216
|
+
nullable: true
|
|
2217
|
+
}),
|
|
2218
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2219
|
+
nullable: true
|
|
2220
|
+
}),
|
|
2221
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2222
|
+
nullable: true
|
|
2223
|
+
}),
|
|
2224
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2225
|
+
nullable: true
|
|
2226
|
+
})
|
|
2227
|
+
}) {}
|
|
2228
|
+
exports.UsageImagesResult = UsageImagesResult;
|
|
2229
|
+
class UsageAudioSpeechesResultObject extends /*#__PURE__*/S.Literal("organization.usage.audio_speeches.result") {}
|
|
2230
|
+
exports.UsageAudioSpeechesResultObject = UsageAudioSpeechesResultObject;
|
|
2231
|
+
class UsageAudioSpeechesResult extends /*#__PURE__*/S.Struct({
|
|
2232
|
+
"object": UsageAudioSpeechesResultObject,
|
|
2233
|
+
"characters": S.Int,
|
|
2234
|
+
"num_model_requests": S.Int,
|
|
2235
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2236
|
+
nullable: true
|
|
2237
|
+
}),
|
|
2238
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2239
|
+
nullable: true
|
|
2240
|
+
}),
|
|
2241
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2242
|
+
nullable: true
|
|
2243
|
+
}),
|
|
2244
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2245
|
+
nullable: true
|
|
2246
|
+
})
|
|
2247
|
+
}) {}
|
|
2248
|
+
exports.UsageAudioSpeechesResult = UsageAudioSpeechesResult;
|
|
2249
|
+
class UsageAudioTranscriptionsResultObject extends /*#__PURE__*/S.Literal("organization.usage.audio_transcriptions.result") {}
|
|
2250
|
+
exports.UsageAudioTranscriptionsResultObject = UsageAudioTranscriptionsResultObject;
|
|
2251
|
+
class UsageAudioTranscriptionsResult extends /*#__PURE__*/S.Struct({
|
|
2252
|
+
"object": UsageAudioTranscriptionsResultObject,
|
|
2253
|
+
"seconds": S.Int,
|
|
2254
|
+
"num_model_requests": S.Int,
|
|
2255
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2256
|
+
nullable: true
|
|
2257
|
+
}),
|
|
2258
|
+
"user_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2259
|
+
nullable: true
|
|
2260
|
+
}),
|
|
2261
|
+
"api_key_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2262
|
+
nullable: true
|
|
2263
|
+
}),
|
|
2264
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2265
|
+
nullable: true
|
|
2266
|
+
})
|
|
2267
|
+
}) {}
|
|
2268
|
+
exports.UsageAudioTranscriptionsResult = UsageAudioTranscriptionsResult;
|
|
2269
|
+
class UsageVectorStoresResultObject extends /*#__PURE__*/S.Literal("organization.usage.vector_stores.result") {}
|
|
2270
|
+
exports.UsageVectorStoresResultObject = UsageVectorStoresResultObject;
|
|
2271
|
+
class UsageVectorStoresResult extends /*#__PURE__*/S.Struct({
|
|
2272
|
+
"object": UsageVectorStoresResultObject,
|
|
2273
|
+
"usage_bytes": S.Int,
|
|
2274
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2275
|
+
nullable: true
|
|
2276
|
+
})
|
|
2277
|
+
}) {}
|
|
2278
|
+
exports.UsageVectorStoresResult = UsageVectorStoresResult;
|
|
2279
|
+
class UsageCodeInterpreterSessionsResultObject extends /*#__PURE__*/S.Literal("organization.usage.code_interpreter_sessions.result") {}
|
|
2280
|
+
exports.UsageCodeInterpreterSessionsResultObject = UsageCodeInterpreterSessionsResultObject;
|
|
2281
|
+
class UsageCodeInterpreterSessionsResult extends /*#__PURE__*/S.Struct({
|
|
2282
|
+
"object": UsageCodeInterpreterSessionsResultObject,
|
|
2283
|
+
"sessions": S.Int,
|
|
2284
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2285
|
+
nullable: true
|
|
2286
|
+
})
|
|
2287
|
+
}) {}
|
|
2288
|
+
exports.UsageCodeInterpreterSessionsResult = UsageCodeInterpreterSessionsResult;
|
|
2289
|
+
class CostsResultObject extends /*#__PURE__*/S.Literal("organization.costs.result") {}
|
|
2290
|
+
exports.CostsResultObject = CostsResultObject;
|
|
2291
|
+
class CostsResult extends /*#__PURE__*/S.Struct({
|
|
2292
|
+
"object": CostsResultObject,
|
|
2293
|
+
"amount": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
2294
|
+
"value": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
2295
|
+
nullable: true
|
|
2296
|
+
}),
|
|
2297
|
+
"currency": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2298
|
+
nullable: true
|
|
2299
|
+
})
|
|
2300
|
+
}), {
|
|
2301
|
+
nullable: true
|
|
2302
|
+
}),
|
|
2303
|
+
"line_item": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2304
|
+
nullable: true
|
|
2305
|
+
}),
|
|
2306
|
+
"project_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2307
|
+
nullable: true
|
|
2308
|
+
})
|
|
2309
|
+
}) {}
|
|
2310
|
+
exports.CostsResult = CostsResult;
|
|
2311
|
+
class UsageTimeBucket extends /*#__PURE__*/S.Struct({
|
|
2312
|
+
"object": UsageTimeBucketObject,
|
|
2313
|
+
"start_time": S.Int,
|
|
2314
|
+
"end_time": S.Int,
|
|
2315
|
+
"result": /*#__PURE__*/S.Array( /*#__PURE__*/S.Union(UsageCompletionsResult, UsageEmbeddingsResult, UsageModerationsResult, UsageImagesResult, UsageAudioSpeechesResult, UsageAudioTranscriptionsResult, UsageVectorStoresResult, UsageCodeInterpreterSessionsResult, CostsResult))
|
|
2316
|
+
}) {}
|
|
2317
|
+
exports.UsageTimeBucket = UsageTimeBucket;
|
|
2318
|
+
class UsageResponse extends /*#__PURE__*/S.Class("UsageResponse")({
|
|
2319
|
+
"object": UsageResponseObject,
|
|
2320
|
+
"data": /*#__PURE__*/S.Array(UsageTimeBucket),
|
|
2321
|
+
"has_more": S.Boolean,
|
|
2322
|
+
"next_page": S.String
|
|
2323
|
+
}) {}
|
|
2324
|
+
exports.UsageResponse = UsageResponse;
|
|
2325
|
+
class ListInvitesParams extends /*#__PURE__*/S.Struct({
|
|
2326
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2327
|
+
nullable: true,
|
|
2328
|
+
default: () => 20
|
|
2329
|
+
}),
|
|
2330
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2331
|
+
nullable: true
|
|
2332
|
+
})
|
|
2333
|
+
}) {}
|
|
2334
|
+
exports.ListInvitesParams = ListInvitesParams;
|
|
2335
|
+
class InviteListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2336
|
+
exports.InviteListResponseObject = InviteListResponseObject;
|
|
2337
|
+
class InviteObject extends /*#__PURE__*/S.Literal("organization.invite") {}
|
|
2338
|
+
exports.InviteObject = InviteObject;
|
|
2339
|
+
class InviteRole extends /*#__PURE__*/S.Literal("owner", "reader") {}
|
|
2340
|
+
exports.InviteRole = InviteRole;
|
|
2341
|
+
class InviteStatus extends /*#__PURE__*/S.Literal("accepted", "expired", "pending") {}
|
|
2342
|
+
exports.InviteStatus = InviteStatus;
|
|
2343
|
+
class InviteProjectsRole extends /*#__PURE__*/S.Literal("member", "owner") {}
|
|
2344
|
+
exports.InviteProjectsRole = InviteProjectsRole;
|
|
2345
|
+
class Invite extends /*#__PURE__*/S.Struct({
|
|
2346
|
+
"object": InviteObject,
|
|
2347
|
+
"id": S.String,
|
|
2348
|
+
"email": S.String,
|
|
2349
|
+
"role": InviteRole,
|
|
2350
|
+
"status": InviteStatus,
|
|
2351
|
+
"invited_at": S.Int,
|
|
2352
|
+
"expires_at": S.Int,
|
|
2353
|
+
"accepted_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2354
|
+
nullable: true
|
|
2355
|
+
}),
|
|
2356
|
+
"projects": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
2357
|
+
"id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2358
|
+
nullable: true
|
|
2359
|
+
}),
|
|
2360
|
+
"role": /*#__PURE__*/S.optionalWith(InviteProjectsRole, {
|
|
2361
|
+
nullable: true
|
|
2362
|
+
})
|
|
2363
|
+
})), {
|
|
2364
|
+
nullable: true
|
|
2365
|
+
})
|
|
2366
|
+
}) {}
|
|
2367
|
+
exports.Invite = Invite;
|
|
2368
|
+
class InviteListResponse extends /*#__PURE__*/S.Class("InviteListResponse")({
|
|
2369
|
+
"object": InviteListResponseObject,
|
|
2370
|
+
"data": /*#__PURE__*/S.Array(Invite),
|
|
2371
|
+
"first_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2372
|
+
nullable: true
|
|
2373
|
+
}),
|
|
2374
|
+
"last_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2375
|
+
nullable: true
|
|
2376
|
+
}),
|
|
2377
|
+
"has_more": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2378
|
+
nullable: true
|
|
2379
|
+
})
|
|
2380
|
+
}) {}
|
|
2381
|
+
exports.InviteListResponse = InviteListResponse;
|
|
2382
|
+
class InviteRequestRole extends /*#__PURE__*/S.Literal("reader", "owner") {}
|
|
2383
|
+
exports.InviteRequestRole = InviteRequestRole;
|
|
2384
|
+
class InviteRequestProjectsRole extends /*#__PURE__*/S.Literal("member", "owner") {}
|
|
2385
|
+
exports.InviteRequestProjectsRole = InviteRequestProjectsRole;
|
|
2386
|
+
class InviteRequest extends /*#__PURE__*/S.Class("InviteRequest")({
|
|
2387
|
+
"email": S.String,
|
|
2388
|
+
"role": InviteRequestRole,
|
|
2389
|
+
"projects": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
2390
|
+
"id": S.String,
|
|
2391
|
+
"role": InviteRequestProjectsRole
|
|
2392
|
+
})), {
|
|
2393
|
+
nullable: true
|
|
2394
|
+
})
|
|
2395
|
+
}) {}
|
|
2396
|
+
exports.InviteRequest = InviteRequest;
|
|
2397
|
+
class InviteDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.invite.deleted") {}
|
|
2398
|
+
exports.InviteDeleteResponseObject = InviteDeleteResponseObject;
|
|
2399
|
+
class InviteDeleteResponse extends /*#__PURE__*/S.Class("InviteDeleteResponse")({
|
|
2400
|
+
"object": InviteDeleteResponseObject,
|
|
2401
|
+
"id": S.String,
|
|
2402
|
+
"deleted": S.Boolean
|
|
2403
|
+
}) {}
|
|
2404
|
+
exports.InviteDeleteResponse = InviteDeleteResponse;
|
|
2405
|
+
class ListProjectsParams extends /*#__PURE__*/S.Struct({
|
|
2406
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2407
|
+
nullable: true,
|
|
2408
|
+
default: () => 20
|
|
2409
|
+
}),
|
|
2410
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2411
|
+
nullable: true
|
|
2412
|
+
}),
|
|
2413
|
+
"include_archived": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2414
|
+
nullable: true,
|
|
2415
|
+
default: () => false
|
|
2416
|
+
})
|
|
2417
|
+
}) {}
|
|
2418
|
+
exports.ListProjectsParams = ListProjectsParams;
|
|
2419
|
+
class ProjectListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2420
|
+
exports.ProjectListResponseObject = ProjectListResponseObject;
|
|
2421
|
+
class ProjectObject extends /*#__PURE__*/S.Literal("organization.project") {}
|
|
2422
|
+
exports.ProjectObject = ProjectObject;
|
|
2423
|
+
class ProjectStatus extends /*#__PURE__*/S.Literal("active", "archived") {}
|
|
2424
|
+
exports.ProjectStatus = ProjectStatus;
|
|
2425
|
+
class Project extends /*#__PURE__*/S.Struct({
|
|
2426
|
+
"id": S.String,
|
|
2427
|
+
"object": ProjectObject,
|
|
2428
|
+
"name": S.String,
|
|
2429
|
+
"created_at": S.Int,
|
|
2430
|
+
"archived_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2431
|
+
nullable: true
|
|
2432
|
+
}),
|
|
2433
|
+
"status": ProjectStatus
|
|
2434
|
+
}) {}
|
|
2435
|
+
exports.Project = Project;
|
|
2436
|
+
class ProjectListResponse extends /*#__PURE__*/S.Class("ProjectListResponse")({
|
|
2437
|
+
"object": ProjectListResponseObject,
|
|
2438
|
+
"data": /*#__PURE__*/S.Array(Project),
|
|
1714
2439
|
"first_id": S.String,
|
|
1715
2440
|
"last_id": S.String,
|
|
1716
2441
|
"has_more": S.Boolean
|
|
@@ -1745,31 +2470,45 @@ class ListProjectApiKeysParams extends /*#__PURE__*/S.Struct({
|
|
|
1745
2470
|
})
|
|
1746
2471
|
}) {}
|
|
1747
2472
|
exports.ListProjectApiKeysParams = ListProjectApiKeysParams;
|
|
2473
|
+
class ProjectApiKeyListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2474
|
+
exports.ProjectApiKeyListResponseObject = ProjectApiKeyListResponseObject;
|
|
2475
|
+
class ProjectApiKeyObject extends /*#__PURE__*/S.Literal("organization.project.api_key") {}
|
|
2476
|
+
exports.ProjectApiKeyObject = ProjectApiKeyObject;
|
|
2477
|
+
class ProjectApiKeyOwnerType extends /*#__PURE__*/S.Literal("user", "service_account") {}
|
|
2478
|
+
exports.ProjectApiKeyOwnerType = ProjectApiKeyOwnerType;
|
|
2479
|
+
class ProjectUserObject extends /*#__PURE__*/S.Literal("organization.project.user") {}
|
|
2480
|
+
exports.ProjectUserObject = ProjectUserObject;
|
|
2481
|
+
class ProjectUserRole extends /*#__PURE__*/S.Literal("owner", "member") {}
|
|
2482
|
+
exports.ProjectUserRole = ProjectUserRole;
|
|
1748
2483
|
class ProjectUser extends /*#__PURE__*/S.Struct({
|
|
1749
|
-
"object":
|
|
2484
|
+
"object": ProjectUserObject,
|
|
1750
2485
|
"id": S.String,
|
|
1751
2486
|
"name": S.String,
|
|
1752
2487
|
"email": S.String,
|
|
1753
|
-
"role":
|
|
2488
|
+
"role": ProjectUserRole,
|
|
1754
2489
|
"added_at": S.Int
|
|
1755
2490
|
}) {}
|
|
1756
2491
|
exports.ProjectUser = ProjectUser;
|
|
2492
|
+
class ProjectServiceAccountObject extends /*#__PURE__*/S.Literal("organization.project.service_account") {}
|
|
2493
|
+
exports.ProjectServiceAccountObject = ProjectServiceAccountObject;
|
|
2494
|
+
class ProjectServiceAccountRole extends /*#__PURE__*/S.Literal("owner", "member") {}
|
|
2495
|
+
exports.ProjectServiceAccountRole = ProjectServiceAccountRole;
|
|
1757
2496
|
class ProjectServiceAccount extends /*#__PURE__*/S.Struct({
|
|
1758
|
-
"object":
|
|
2497
|
+
"object": ProjectServiceAccountObject,
|
|
1759
2498
|
"id": S.String,
|
|
1760
2499
|
"name": S.String,
|
|
1761
|
-
"role":
|
|
2500
|
+
"role": ProjectServiceAccountRole,
|
|
1762
2501
|
"created_at": S.Int
|
|
1763
2502
|
}) {}
|
|
1764
2503
|
exports.ProjectServiceAccount = ProjectServiceAccount;
|
|
1765
2504
|
class ProjectApiKey extends /*#__PURE__*/S.Struct({
|
|
1766
|
-
"object":
|
|
2505
|
+
"object": ProjectApiKeyObject,
|
|
1767
2506
|
"redacted_value": S.String,
|
|
1768
2507
|
"name": S.String,
|
|
1769
2508
|
"created_at": S.Int,
|
|
1770
2509
|
"id": S.String,
|
|
1771
2510
|
"owner": /*#__PURE__*/S.Struct({
|
|
1772
|
-
"type": /*#__PURE__*/S.optionalWith(
|
|
2511
|
+
"type": /*#__PURE__*/S.optionalWith(ProjectApiKeyOwnerType, {
|
|
1773
2512
|
nullable: true
|
|
1774
2513
|
}),
|
|
1775
2514
|
"user": /*#__PURE__*/S.optionalWith(ProjectUser, {
|
|
@@ -1782,97 +2521,464 @@ class ProjectApiKey extends /*#__PURE__*/S.Struct({
|
|
|
1782
2521
|
}) {}
|
|
1783
2522
|
exports.ProjectApiKey = ProjectApiKey;
|
|
1784
2523
|
class ProjectApiKeyListResponse extends /*#__PURE__*/S.Class("ProjectApiKeyListResponse")({
|
|
1785
|
-
"object":
|
|
2524
|
+
"object": ProjectApiKeyListResponseObject,
|
|
1786
2525
|
"data": /*#__PURE__*/S.Array(ProjectApiKey),
|
|
1787
2526
|
"first_id": S.String,
|
|
1788
2527
|
"last_id": S.String,
|
|
1789
2528
|
"has_more": S.Boolean
|
|
1790
2529
|
}) {}
|
|
1791
2530
|
exports.ProjectApiKeyListResponse = ProjectApiKeyListResponse;
|
|
2531
|
+
class ProjectApiKeyDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.project.api_key.deleted") {}
|
|
2532
|
+
exports.ProjectApiKeyDeleteResponseObject = ProjectApiKeyDeleteResponseObject;
|
|
1792
2533
|
class ProjectApiKeyDeleteResponse extends /*#__PURE__*/S.Class("ProjectApiKeyDeleteResponse")({
|
|
1793
|
-
"object":
|
|
2534
|
+
"object": ProjectApiKeyDeleteResponseObject,
|
|
1794
2535
|
"id": S.String,
|
|
1795
2536
|
"deleted": S.Boolean
|
|
1796
2537
|
}) {}
|
|
1797
|
-
exports.ProjectApiKeyDeleteResponse = ProjectApiKeyDeleteResponse;
|
|
1798
|
-
class
|
|
1799
|
-
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2538
|
+
exports.ProjectApiKeyDeleteResponse = ProjectApiKeyDeleteResponse;
|
|
2539
|
+
class ListProjectRateLimitsParams extends /*#__PURE__*/S.Struct({
|
|
2540
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2541
|
+
nullable: true,
|
|
2542
|
+
default: () => 100
|
|
2543
|
+
}),
|
|
2544
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2545
|
+
nullable: true
|
|
2546
|
+
}),
|
|
2547
|
+
"before": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2548
|
+
nullable: true
|
|
2549
|
+
})
|
|
2550
|
+
}) {}
|
|
2551
|
+
exports.ListProjectRateLimitsParams = ListProjectRateLimitsParams;
|
|
2552
|
+
class ProjectRateLimitListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2553
|
+
exports.ProjectRateLimitListResponseObject = ProjectRateLimitListResponseObject;
|
|
2554
|
+
class ProjectRateLimitObject extends /*#__PURE__*/S.Literal("project.rate_limit") {}
|
|
2555
|
+
exports.ProjectRateLimitObject = ProjectRateLimitObject;
|
|
2556
|
+
class ProjectRateLimit extends /*#__PURE__*/S.Struct({
|
|
2557
|
+
"object": ProjectRateLimitObject,
|
|
2558
|
+
"id": S.String,
|
|
2559
|
+
"model": S.String,
|
|
2560
|
+
"max_requests_per_1_minute": S.Int,
|
|
2561
|
+
"max_tokens_per_1_minute": S.Int,
|
|
2562
|
+
"max_images_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2563
|
+
nullable: true
|
|
2564
|
+
}),
|
|
2565
|
+
"max_audio_megabytes_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2566
|
+
nullable: true
|
|
2567
|
+
}),
|
|
2568
|
+
"max_requests_per_1_day": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2569
|
+
nullable: true
|
|
2570
|
+
}),
|
|
2571
|
+
"batch_1_day_max_input_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2572
|
+
nullable: true
|
|
2573
|
+
})
|
|
2574
|
+
}) {}
|
|
2575
|
+
exports.ProjectRateLimit = ProjectRateLimit;
|
|
2576
|
+
class ProjectRateLimitListResponse extends /*#__PURE__*/S.Class("ProjectRateLimitListResponse")({
|
|
2577
|
+
"object": ProjectRateLimitListResponseObject,
|
|
2578
|
+
"data": /*#__PURE__*/S.Array(ProjectRateLimit),
|
|
2579
|
+
"first_id": S.String,
|
|
2580
|
+
"last_id": S.String,
|
|
2581
|
+
"has_more": S.Boolean
|
|
2582
|
+
}) {}
|
|
2583
|
+
exports.ProjectRateLimitListResponse = ProjectRateLimitListResponse;
|
|
2584
|
+
class ProjectRateLimitUpdateRequest extends /*#__PURE__*/S.Class("ProjectRateLimitUpdateRequest")({
|
|
2585
|
+
"max_requests_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2586
|
+
nullable: true
|
|
2587
|
+
}),
|
|
2588
|
+
"max_tokens_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2589
|
+
nullable: true
|
|
2590
|
+
}),
|
|
2591
|
+
"max_images_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2592
|
+
nullable: true
|
|
2593
|
+
}),
|
|
2594
|
+
"max_audio_megabytes_per_1_minute": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2595
|
+
nullable: true
|
|
2596
|
+
}),
|
|
2597
|
+
"max_requests_per_1_day": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2598
|
+
nullable: true
|
|
2599
|
+
}),
|
|
2600
|
+
"batch_1_day_max_input_tokens": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2601
|
+
nullable: true
|
|
2602
|
+
})
|
|
2603
|
+
}) {}
|
|
2604
|
+
exports.ProjectRateLimitUpdateRequest = ProjectRateLimitUpdateRequest;
|
|
2605
|
+
class ListProjectServiceAccountsParams extends /*#__PURE__*/S.Struct({
|
|
2606
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2607
|
+
nullable: true,
|
|
2608
|
+
default: () => 20
|
|
2609
|
+
}),
|
|
2610
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2611
|
+
nullable: true
|
|
2612
|
+
})
|
|
2613
|
+
}) {}
|
|
2614
|
+
exports.ListProjectServiceAccountsParams = ListProjectServiceAccountsParams;
|
|
2615
|
+
class ProjectServiceAccountListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2616
|
+
exports.ProjectServiceAccountListResponseObject = ProjectServiceAccountListResponseObject;
|
|
2617
|
+
class ProjectServiceAccountListResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountListResponse")({
|
|
2618
|
+
"object": ProjectServiceAccountListResponseObject,
|
|
2619
|
+
"data": /*#__PURE__*/S.Array(ProjectServiceAccount),
|
|
2620
|
+
"first_id": S.String,
|
|
2621
|
+
"last_id": S.String,
|
|
2622
|
+
"has_more": S.Boolean
|
|
2623
|
+
}) {}
|
|
2624
|
+
exports.ProjectServiceAccountListResponse = ProjectServiceAccountListResponse;
|
|
2625
|
+
class ProjectServiceAccountCreateRequest extends /*#__PURE__*/S.Class("ProjectServiceAccountCreateRequest")({
|
|
2626
|
+
"name": S.String
|
|
2627
|
+
}) {}
|
|
2628
|
+
exports.ProjectServiceAccountCreateRequest = ProjectServiceAccountCreateRequest;
|
|
2629
|
+
class ProjectServiceAccountCreateResponseObject extends /*#__PURE__*/S.Literal("organization.project.service_account") {}
|
|
2630
|
+
exports.ProjectServiceAccountCreateResponseObject = ProjectServiceAccountCreateResponseObject;
|
|
2631
|
+
class ProjectServiceAccountCreateResponseRole extends /*#__PURE__*/S.Literal("member") {}
|
|
2632
|
+
exports.ProjectServiceAccountCreateResponseRole = ProjectServiceAccountCreateResponseRole;
|
|
2633
|
+
class ProjectServiceAccountApiKeyObject extends /*#__PURE__*/S.Literal("organization.project.service_account.api_key") {}
|
|
2634
|
+
exports.ProjectServiceAccountApiKeyObject = ProjectServiceAccountApiKeyObject;
|
|
2635
|
+
class ProjectServiceAccountApiKey extends /*#__PURE__*/S.Struct({
|
|
2636
|
+
"object": ProjectServiceAccountApiKeyObject,
|
|
2637
|
+
"value": S.String,
|
|
2638
|
+
"name": S.String,
|
|
2639
|
+
"created_at": S.Int,
|
|
2640
|
+
"id": S.String
|
|
2641
|
+
}) {}
|
|
2642
|
+
exports.ProjectServiceAccountApiKey = ProjectServiceAccountApiKey;
|
|
2643
|
+
class ProjectServiceAccountCreateResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountCreateResponse")({
|
|
2644
|
+
"object": ProjectServiceAccountCreateResponseObject,
|
|
2645
|
+
"id": S.String,
|
|
2646
|
+
"name": S.String,
|
|
2647
|
+
"role": ProjectServiceAccountCreateResponseRole,
|
|
2648
|
+
"created_at": S.Int,
|
|
2649
|
+
"api_key": ProjectServiceAccountApiKey
|
|
2650
|
+
}) {}
|
|
2651
|
+
exports.ProjectServiceAccountCreateResponse = ProjectServiceAccountCreateResponse;
|
|
2652
|
+
class ProjectServiceAccountDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.project.service_account.deleted") {}
|
|
2653
|
+
exports.ProjectServiceAccountDeleteResponseObject = ProjectServiceAccountDeleteResponseObject;
|
|
2654
|
+
class ProjectServiceAccountDeleteResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountDeleteResponse")({
|
|
2655
|
+
"object": ProjectServiceAccountDeleteResponseObject,
|
|
2656
|
+
"id": S.String,
|
|
2657
|
+
"deleted": S.Boolean
|
|
2658
|
+
}) {}
|
|
2659
|
+
exports.ProjectServiceAccountDeleteResponse = ProjectServiceAccountDeleteResponse;
|
|
2660
|
+
class ListProjectUsersParams extends /*#__PURE__*/S.Struct({
|
|
2661
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2662
|
+
nullable: true,
|
|
2663
|
+
default: () => 20
|
|
2664
|
+
}),
|
|
2665
|
+
"after": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2666
|
+
nullable: true
|
|
2667
|
+
})
|
|
2668
|
+
}) {}
|
|
2669
|
+
exports.ListProjectUsersParams = ListProjectUsersParams;
|
|
2670
|
+
class ProjectUserListResponse extends /*#__PURE__*/S.Class("ProjectUserListResponse")({
|
|
2671
|
+
"object": S.String,
|
|
2672
|
+
"data": /*#__PURE__*/S.Array(ProjectUser),
|
|
2673
|
+
"first_id": S.String,
|
|
2674
|
+
"last_id": S.String,
|
|
2675
|
+
"has_more": S.Boolean
|
|
2676
|
+
}) {}
|
|
2677
|
+
exports.ProjectUserListResponse = ProjectUserListResponse;
|
|
2678
|
+
class ProjectUserCreateRequestRole extends /*#__PURE__*/S.Literal("owner", "member") {}
|
|
2679
|
+
exports.ProjectUserCreateRequestRole = ProjectUserCreateRequestRole;
|
|
2680
|
+
class ProjectUserCreateRequest extends /*#__PURE__*/S.Class("ProjectUserCreateRequest")({
|
|
2681
|
+
"user_id": S.String,
|
|
2682
|
+
"role": ProjectUserCreateRequestRole
|
|
2683
|
+
}) {}
|
|
2684
|
+
exports.ProjectUserCreateRequest = ProjectUserCreateRequest;
|
|
2685
|
+
class ProjectUserUpdateRequestRole extends /*#__PURE__*/S.Literal("owner", "member") {}
|
|
2686
|
+
exports.ProjectUserUpdateRequestRole = ProjectUserUpdateRequestRole;
|
|
2687
|
+
class ProjectUserUpdateRequest extends /*#__PURE__*/S.Class("ProjectUserUpdateRequest")({
|
|
2688
|
+
"role": ProjectUserUpdateRequestRole
|
|
2689
|
+
}) {}
|
|
2690
|
+
exports.ProjectUserUpdateRequest = ProjectUserUpdateRequest;
|
|
2691
|
+
class ProjectUserDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.project.user.deleted") {}
|
|
2692
|
+
exports.ProjectUserDeleteResponseObject = ProjectUserDeleteResponseObject;
|
|
2693
|
+
class ProjectUserDeleteResponse extends /*#__PURE__*/S.Class("ProjectUserDeleteResponse")({
|
|
2694
|
+
"object": ProjectUserDeleteResponseObject,
|
|
2695
|
+
"id": S.String,
|
|
2696
|
+
"deleted": S.Boolean
|
|
2697
|
+
}) {}
|
|
2698
|
+
exports.ProjectUserDeleteResponse = ProjectUserDeleteResponse;
|
|
2699
|
+
class UsageAudioSpeechesParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2700
|
+
exports.UsageAudioSpeechesParamsBucketWidth = UsageAudioSpeechesParamsBucketWidth;
|
|
2701
|
+
class UsageAudioSpeechesParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2702
|
+
exports.UsageAudioSpeechesParamsGroupBy = UsageAudioSpeechesParamsGroupBy;
|
|
2703
|
+
class UsageAudioSpeechesParams extends /*#__PURE__*/S.Struct({
|
|
2704
|
+
"start_time": S.Int,
|
|
2705
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2706
|
+
nullable: true
|
|
2707
|
+
}),
|
|
2708
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageAudioSpeechesParamsBucketWidth, {
|
|
2709
|
+
nullable: true,
|
|
2710
|
+
default: () => "1d"
|
|
2711
|
+
}),
|
|
2712
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2713
|
+
nullable: true
|
|
2714
|
+
}),
|
|
2715
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2716
|
+
nullable: true
|
|
2717
|
+
}),
|
|
2718
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2719
|
+
nullable: true
|
|
2720
|
+
}),
|
|
2721
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2722
|
+
nullable: true
|
|
2723
|
+
}),
|
|
2724
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageAudioSpeechesParamsGroupBy), {
|
|
2725
|
+
nullable: true
|
|
2726
|
+
}),
|
|
2727
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2728
|
+
nullable: true
|
|
2729
|
+
}),
|
|
2730
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2731
|
+
nullable: true
|
|
2732
|
+
})
|
|
2733
|
+
}) {}
|
|
2734
|
+
exports.UsageAudioSpeechesParams = UsageAudioSpeechesParams;
|
|
2735
|
+
class UsageAudioTranscriptionsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2736
|
+
exports.UsageAudioTranscriptionsParamsBucketWidth = UsageAudioTranscriptionsParamsBucketWidth;
|
|
2737
|
+
class UsageAudioTranscriptionsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2738
|
+
exports.UsageAudioTranscriptionsParamsGroupBy = UsageAudioTranscriptionsParamsGroupBy;
|
|
2739
|
+
class UsageAudioTranscriptionsParams extends /*#__PURE__*/S.Struct({
|
|
2740
|
+
"start_time": S.Int,
|
|
2741
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2742
|
+
nullable: true
|
|
2743
|
+
}),
|
|
2744
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageAudioTranscriptionsParamsBucketWidth, {
|
|
2745
|
+
nullable: true,
|
|
2746
|
+
default: () => "1d"
|
|
2747
|
+
}),
|
|
2748
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2749
|
+
nullable: true
|
|
2750
|
+
}),
|
|
2751
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2752
|
+
nullable: true
|
|
2753
|
+
}),
|
|
2754
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2755
|
+
nullable: true
|
|
2756
|
+
}),
|
|
2757
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2758
|
+
nullable: true
|
|
2759
|
+
}),
|
|
2760
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageAudioTranscriptionsParamsGroupBy), {
|
|
2761
|
+
nullable: true
|
|
2762
|
+
}),
|
|
2763
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2764
|
+
nullable: true
|
|
2765
|
+
}),
|
|
2766
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2767
|
+
nullable: true
|
|
2768
|
+
})
|
|
2769
|
+
}) {}
|
|
2770
|
+
exports.UsageAudioTranscriptionsParams = UsageAudioTranscriptionsParams;
|
|
2771
|
+
class UsageCodeInterpreterSessionsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2772
|
+
exports.UsageCodeInterpreterSessionsParamsBucketWidth = UsageCodeInterpreterSessionsParamsBucketWidth;
|
|
2773
|
+
class UsageCodeInterpreterSessionsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id") {}
|
|
2774
|
+
exports.UsageCodeInterpreterSessionsParamsGroupBy = UsageCodeInterpreterSessionsParamsGroupBy;
|
|
2775
|
+
class UsageCodeInterpreterSessionsParams extends /*#__PURE__*/S.Struct({
|
|
2776
|
+
"start_time": S.Int,
|
|
2777
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2778
|
+
nullable: true
|
|
2779
|
+
}),
|
|
2780
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageCodeInterpreterSessionsParamsBucketWidth, {
|
|
2781
|
+
nullable: true,
|
|
2782
|
+
default: () => "1d"
|
|
2783
|
+
}),
|
|
2784
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2785
|
+
nullable: true
|
|
2786
|
+
}),
|
|
2787
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageCodeInterpreterSessionsParamsGroupBy), {
|
|
2788
|
+
nullable: true
|
|
2789
|
+
}),
|
|
2790
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2791
|
+
nullable: true
|
|
2792
|
+
}),
|
|
2793
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2794
|
+
nullable: true
|
|
2795
|
+
})
|
|
2796
|
+
}) {}
|
|
2797
|
+
exports.UsageCodeInterpreterSessionsParams = UsageCodeInterpreterSessionsParams;
|
|
2798
|
+
class UsageCompletionsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2799
|
+
exports.UsageCompletionsParamsBucketWidth = UsageCompletionsParamsBucketWidth;
|
|
2800
|
+
class UsageCompletionsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model", "batch") {}
|
|
2801
|
+
exports.UsageCompletionsParamsGroupBy = UsageCompletionsParamsGroupBy;
|
|
2802
|
+
class UsageCompletionsParams extends /*#__PURE__*/S.Struct({
|
|
2803
|
+
"start_time": S.Int,
|
|
2804
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2805
|
+
nullable: true
|
|
2806
|
+
}),
|
|
2807
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageCompletionsParamsBucketWidth, {
|
|
2808
|
+
nullable: true,
|
|
2809
|
+
default: () => "1d"
|
|
2810
|
+
}),
|
|
2811
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2812
|
+
nullable: true
|
|
2813
|
+
}),
|
|
2814
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2815
|
+
nullable: true
|
|
2816
|
+
}),
|
|
2817
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2818
|
+
nullable: true
|
|
2819
|
+
}),
|
|
2820
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2821
|
+
nullable: true
|
|
2822
|
+
}),
|
|
2823
|
+
"batch": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
2824
|
+
nullable: true
|
|
2825
|
+
}),
|
|
2826
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageCompletionsParamsGroupBy), {
|
|
2827
|
+
nullable: true
|
|
2828
|
+
}),
|
|
2829
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2830
|
+
nullable: true
|
|
2831
|
+
}),
|
|
2832
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2833
|
+
nullable: true
|
|
2834
|
+
})
|
|
2835
|
+
}) {}
|
|
2836
|
+
exports.UsageCompletionsParams = UsageCompletionsParams;
|
|
2837
|
+
class UsageEmbeddingsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2838
|
+
exports.UsageEmbeddingsParamsBucketWidth = UsageEmbeddingsParamsBucketWidth;
|
|
2839
|
+
class UsageEmbeddingsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2840
|
+
exports.UsageEmbeddingsParamsGroupBy = UsageEmbeddingsParamsGroupBy;
|
|
2841
|
+
class UsageEmbeddingsParams extends /*#__PURE__*/S.Struct({
|
|
2842
|
+
"start_time": S.Int,
|
|
2843
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2844
|
+
nullable: true
|
|
2845
|
+
}),
|
|
2846
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageEmbeddingsParamsBucketWidth, {
|
|
2847
|
+
nullable: true,
|
|
2848
|
+
default: () => "1d"
|
|
2849
|
+
}),
|
|
2850
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2851
|
+
nullable: true
|
|
2852
|
+
}),
|
|
2853
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2854
|
+
nullable: true
|
|
2855
|
+
}),
|
|
2856
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2857
|
+
nullable: true
|
|
2858
|
+
}),
|
|
2859
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2860
|
+
nullable: true
|
|
2861
|
+
}),
|
|
2862
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageEmbeddingsParamsGroupBy), {
|
|
2863
|
+
nullable: true
|
|
2864
|
+
}),
|
|
2865
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2866
|
+
nullable: true
|
|
2867
|
+
}),
|
|
2868
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2869
|
+
nullable: true
|
|
2870
|
+
})
|
|
2871
|
+
}) {}
|
|
2872
|
+
exports.UsageEmbeddingsParams = UsageEmbeddingsParams;
|
|
2873
|
+
class UsageImagesParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2874
|
+
exports.UsageImagesParamsBucketWidth = UsageImagesParamsBucketWidth;
|
|
2875
|
+
class UsageImagesParamsSources extends /*#__PURE__*/S.Literal("image.generation", "image.edit", "image.variation") {}
|
|
2876
|
+
exports.UsageImagesParamsSources = UsageImagesParamsSources;
|
|
2877
|
+
class UsageImagesParamsSizes extends /*#__PURE__*/S.Literal("256x256", "512x512", "1024x1024", "1792x1792", "1024x1792") {}
|
|
2878
|
+
exports.UsageImagesParamsSizes = UsageImagesParamsSizes;
|
|
2879
|
+
class UsageImagesParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model", "size", "source") {}
|
|
2880
|
+
exports.UsageImagesParamsGroupBy = UsageImagesParamsGroupBy;
|
|
2881
|
+
class UsageImagesParams extends /*#__PURE__*/S.Struct({
|
|
2882
|
+
"start_time": S.Int,
|
|
2883
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2884
|
+
nullable: true
|
|
2885
|
+
}),
|
|
2886
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageImagesParamsBucketWidth, {
|
|
2887
|
+
nullable: true,
|
|
2888
|
+
default: () => "1d"
|
|
2889
|
+
}),
|
|
2890
|
+
"sources": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageImagesParamsSources), {
|
|
2891
|
+
nullable: true
|
|
2892
|
+
}),
|
|
2893
|
+
"sizes": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageImagesParamsSizes), {
|
|
2894
|
+
nullable: true
|
|
2895
|
+
}),
|
|
2896
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2897
|
+
nullable: true
|
|
2898
|
+
}),
|
|
2899
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2900
|
+
nullable: true
|
|
2901
|
+
}),
|
|
2902
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2903
|
+
nullable: true
|
|
2904
|
+
}),
|
|
2905
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2906
|
+
nullable: true
|
|
2907
|
+
}),
|
|
2908
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageImagesParamsGroupBy), {
|
|
2909
|
+
nullable: true
|
|
2910
|
+
}),
|
|
2911
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2912
|
+
nullable: true
|
|
2913
|
+
}),
|
|
2914
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2915
|
+
nullable: true
|
|
2916
|
+
})
|
|
2917
|
+
}) {}
|
|
2918
|
+
exports.UsageImagesParams = UsageImagesParams;
|
|
2919
|
+
class UsageModerationsParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2920
|
+
exports.UsageModerationsParamsBucketWidth = UsageModerationsParamsBucketWidth;
|
|
2921
|
+
class UsageModerationsParamsGroupBy extends /*#__PURE__*/S.Literal("project_id", "user_id", "api_key_id", "model") {}
|
|
2922
|
+
exports.UsageModerationsParamsGroupBy = UsageModerationsParamsGroupBy;
|
|
2923
|
+
class UsageModerationsParams extends /*#__PURE__*/S.Struct({
|
|
2924
|
+
"start_time": S.Int,
|
|
2925
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2926
|
+
nullable: true
|
|
2927
|
+
}),
|
|
2928
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageModerationsParamsBucketWidth, {
|
|
1800
2929
|
nullable: true,
|
|
1801
|
-
default: () =>
|
|
2930
|
+
default: () => "1d"
|
|
1802
2931
|
}),
|
|
1803
|
-
"
|
|
2932
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2933
|
+
nullable: true
|
|
2934
|
+
}),
|
|
2935
|
+
"user_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2936
|
+
nullable: true
|
|
2937
|
+
}),
|
|
2938
|
+
"api_key_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2939
|
+
nullable: true
|
|
2940
|
+
}),
|
|
2941
|
+
"models": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2942
|
+
nullable: true
|
|
2943
|
+
}),
|
|
2944
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageModerationsParamsGroupBy), {
|
|
2945
|
+
nullable: true
|
|
2946
|
+
}),
|
|
2947
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2948
|
+
nullable: true
|
|
2949
|
+
}),
|
|
2950
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1804
2951
|
nullable: true
|
|
1805
2952
|
})
|
|
1806
2953
|
}) {}
|
|
1807
|
-
exports.
|
|
1808
|
-
class
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
"
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
"
|
|
1818
|
-
}) {}
|
|
1819
|
-
exports.ProjectServiceAccountCreateRequest = ProjectServiceAccountCreateRequest;
|
|
1820
|
-
class ProjectServiceAccountApiKey extends /*#__PURE__*/S.Struct({
|
|
1821
|
-
"object": /*#__PURE__*/S.Literal("organization.project.service_account.api_key"),
|
|
1822
|
-
"value": S.String,
|
|
1823
|
-
"name": S.String,
|
|
1824
|
-
"created_at": S.Int,
|
|
1825
|
-
"id": S.String
|
|
1826
|
-
}) {}
|
|
1827
|
-
exports.ProjectServiceAccountApiKey = ProjectServiceAccountApiKey;
|
|
1828
|
-
class ProjectServiceAccountCreateResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountCreateResponse")({
|
|
1829
|
-
"object": /*#__PURE__*/S.Literal("organization.project.service_account"),
|
|
1830
|
-
"id": S.String,
|
|
1831
|
-
"name": S.String,
|
|
1832
|
-
"role": /*#__PURE__*/S.Literal("member"),
|
|
1833
|
-
"created_at": S.Int,
|
|
1834
|
-
"api_key": ProjectServiceAccountApiKey
|
|
1835
|
-
}) {}
|
|
1836
|
-
exports.ProjectServiceAccountCreateResponse = ProjectServiceAccountCreateResponse;
|
|
1837
|
-
class ProjectServiceAccountDeleteResponse extends /*#__PURE__*/S.Class("ProjectServiceAccountDeleteResponse")({
|
|
1838
|
-
"object": /*#__PURE__*/S.Literal("organization.project.service_account.deleted"),
|
|
1839
|
-
"id": S.String,
|
|
1840
|
-
"deleted": S.Boolean
|
|
1841
|
-
}) {}
|
|
1842
|
-
exports.ProjectServiceAccountDeleteResponse = ProjectServiceAccountDeleteResponse;
|
|
1843
|
-
class ListProjectUsersParams extends /*#__PURE__*/S.Struct({
|
|
1844
|
-
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2954
|
+
exports.UsageModerationsParams = UsageModerationsParams;
|
|
2955
|
+
class UsageVectorStoresParamsBucketWidth extends /*#__PURE__*/S.Literal("1m", "1h", "1d") {}
|
|
2956
|
+
exports.UsageVectorStoresParamsBucketWidth = UsageVectorStoresParamsBucketWidth;
|
|
2957
|
+
class UsageVectorStoresParamsGroupBy extends /*#__PURE__*/S.Literal("project_id") {}
|
|
2958
|
+
exports.UsageVectorStoresParamsGroupBy = UsageVectorStoresParamsGroupBy;
|
|
2959
|
+
class UsageVectorStoresParams extends /*#__PURE__*/S.Struct({
|
|
2960
|
+
"start_time": S.Int,
|
|
2961
|
+
"end_time": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2962
|
+
nullable: true
|
|
2963
|
+
}),
|
|
2964
|
+
"bucket_width": /*#__PURE__*/S.optionalWith(UsageVectorStoresParamsBucketWidth, {
|
|
1845
2965
|
nullable: true,
|
|
1846
|
-
default: () =>
|
|
2966
|
+
default: () => "1d"
|
|
1847
2967
|
}),
|
|
1848
|
-
"
|
|
2968
|
+
"project_ids": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(S.String), {
|
|
2969
|
+
nullable: true
|
|
2970
|
+
}),
|
|
2971
|
+
"group_by": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(UsageVectorStoresParamsGroupBy), {
|
|
2972
|
+
nullable: true
|
|
2973
|
+
}),
|
|
2974
|
+
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2975
|
+
nullable: true
|
|
2976
|
+
}),
|
|
2977
|
+
"page": /*#__PURE__*/S.optionalWith(S.String, {
|
|
1849
2978
|
nullable: true
|
|
1850
2979
|
})
|
|
1851
2980
|
}) {}
|
|
1852
|
-
exports.
|
|
1853
|
-
class ProjectUserListResponse extends /*#__PURE__*/S.Class("ProjectUserListResponse")({
|
|
1854
|
-
"object": S.String,
|
|
1855
|
-
"data": /*#__PURE__*/S.Array(ProjectUser),
|
|
1856
|
-
"first_id": S.String,
|
|
1857
|
-
"last_id": S.String,
|
|
1858
|
-
"has_more": S.Boolean
|
|
1859
|
-
}) {}
|
|
1860
|
-
exports.ProjectUserListResponse = ProjectUserListResponse;
|
|
1861
|
-
class ProjectUserCreateRequest extends /*#__PURE__*/S.Class("ProjectUserCreateRequest")({
|
|
1862
|
-
"user_id": S.String,
|
|
1863
|
-
"role": /*#__PURE__*/S.Literal("owner", "member")
|
|
1864
|
-
}) {}
|
|
1865
|
-
exports.ProjectUserCreateRequest = ProjectUserCreateRequest;
|
|
1866
|
-
class ProjectUserUpdateRequest extends /*#__PURE__*/S.Class("ProjectUserUpdateRequest")({
|
|
1867
|
-
"role": /*#__PURE__*/S.Literal("owner", "member")
|
|
1868
|
-
}) {}
|
|
1869
|
-
exports.ProjectUserUpdateRequest = ProjectUserUpdateRequest;
|
|
1870
|
-
class ProjectUserDeleteResponse extends /*#__PURE__*/S.Class("ProjectUserDeleteResponse")({
|
|
1871
|
-
"object": /*#__PURE__*/S.Literal("organization.project.user.deleted"),
|
|
1872
|
-
"id": S.String,
|
|
1873
|
-
"deleted": S.Boolean
|
|
1874
|
-
}) {}
|
|
1875
|
-
exports.ProjectUserDeleteResponse = ProjectUserDeleteResponse;
|
|
2981
|
+
exports.UsageVectorStoresParams = UsageVectorStoresParams;
|
|
1876
2982
|
class ListUsersParams extends /*#__PURE__*/S.Struct({
|
|
1877
2983
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
1878
2984
|
nullable: true,
|
|
@@ -1883,66 +2989,257 @@ class ListUsersParams extends /*#__PURE__*/S.Struct({
|
|
|
1883
2989
|
})
|
|
1884
2990
|
}) {}
|
|
1885
2991
|
exports.ListUsersParams = ListUsersParams;
|
|
2992
|
+
class UserListResponseObject extends /*#__PURE__*/S.Literal("list") {}
|
|
2993
|
+
exports.UserListResponseObject = UserListResponseObject;
|
|
2994
|
+
class UserObject extends /*#__PURE__*/S.Literal("organization.user") {}
|
|
2995
|
+
exports.UserObject = UserObject;
|
|
2996
|
+
class UserRole extends /*#__PURE__*/S.Literal("owner", "reader") {}
|
|
2997
|
+
exports.UserRole = UserRole;
|
|
1886
2998
|
class User extends /*#__PURE__*/S.Struct({
|
|
1887
|
-
"object":
|
|
2999
|
+
"object": UserObject,
|
|
1888
3000
|
"id": S.String,
|
|
1889
3001
|
"name": S.String,
|
|
1890
3002
|
"email": S.String,
|
|
1891
|
-
"role":
|
|
3003
|
+
"role": UserRole,
|
|
1892
3004
|
"added_at": S.Int
|
|
1893
3005
|
}) {}
|
|
1894
3006
|
exports.User = User;
|
|
1895
3007
|
class UserListResponse extends /*#__PURE__*/S.Class("UserListResponse")({
|
|
1896
|
-
"object":
|
|
3008
|
+
"object": UserListResponseObject,
|
|
1897
3009
|
"data": /*#__PURE__*/S.Array(User),
|
|
1898
3010
|
"first_id": S.String,
|
|
1899
3011
|
"last_id": S.String,
|
|
1900
3012
|
"has_more": S.Boolean
|
|
1901
3013
|
}) {}
|
|
1902
3014
|
exports.UserListResponse = UserListResponse;
|
|
3015
|
+
class UserRoleUpdateRequestRole extends /*#__PURE__*/S.Literal("owner", "reader") {}
|
|
3016
|
+
exports.UserRoleUpdateRequestRole = UserRoleUpdateRequestRole;
|
|
1903
3017
|
class UserRoleUpdateRequest extends /*#__PURE__*/S.Class("UserRoleUpdateRequest")({
|
|
1904
|
-
"role":
|
|
3018
|
+
"role": UserRoleUpdateRequestRole
|
|
1905
3019
|
}) {}
|
|
1906
3020
|
exports.UserRoleUpdateRequest = UserRoleUpdateRequest;
|
|
3021
|
+
class UserDeleteResponseObject extends /*#__PURE__*/S.Literal("organization.user.deleted") {}
|
|
3022
|
+
exports.UserDeleteResponseObject = UserDeleteResponseObject;
|
|
1907
3023
|
class UserDeleteResponse extends /*#__PURE__*/S.Class("UserDeleteResponse")({
|
|
1908
|
-
"object":
|
|
3024
|
+
"object": UserDeleteResponseObject,
|
|
1909
3025
|
"id": S.String,
|
|
1910
3026
|
"deleted": S.Boolean
|
|
1911
3027
|
}) {}
|
|
1912
3028
|
exports.UserDeleteResponse = UserDeleteResponse;
|
|
3029
|
+
class RealtimeSessionCreateRequestModel extends /*#__PURE__*/S.Literal("gpt-4o-realtime-preview", "gpt-4o-realtime-preview-2024-10-01", "gpt-4o-realtime-preview-2024-12-17", "gpt-4o-mini-realtime-preview", "gpt-4o-mini-realtime-preview-2024-12-17") {}
|
|
3030
|
+
exports.RealtimeSessionCreateRequestModel = RealtimeSessionCreateRequestModel;
|
|
3031
|
+
class RealtimeSessionCreateRequestVoice extends /*#__PURE__*/S.Literal("alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse") {}
|
|
3032
|
+
exports.RealtimeSessionCreateRequestVoice = RealtimeSessionCreateRequestVoice;
|
|
3033
|
+
class RealtimeSessionCreateRequestInputAudioFormat extends /*#__PURE__*/S.Literal("pcm16", "g711_ulaw", "g711_alaw") {}
|
|
3034
|
+
exports.RealtimeSessionCreateRequestInputAudioFormat = RealtimeSessionCreateRequestInputAudioFormat;
|
|
3035
|
+
class RealtimeSessionCreateRequestOutputAudioFormat extends /*#__PURE__*/S.Literal("pcm16", "g711_ulaw", "g711_alaw") {}
|
|
3036
|
+
exports.RealtimeSessionCreateRequestOutputAudioFormat = RealtimeSessionCreateRequestOutputAudioFormat;
|
|
3037
|
+
class RealtimeSessionCreateRequestToolsType extends /*#__PURE__*/S.Literal("function") {}
|
|
3038
|
+
exports.RealtimeSessionCreateRequestToolsType = RealtimeSessionCreateRequestToolsType;
|
|
3039
|
+
class RealtimeSessionCreateRequestMaxResponseOutputTokens extends /*#__PURE__*/S.Literal("inf") {}
|
|
3040
|
+
exports.RealtimeSessionCreateRequestMaxResponseOutputTokens = RealtimeSessionCreateRequestMaxResponseOutputTokens;
|
|
3041
|
+
class RealtimeSessionCreateRequest extends /*#__PURE__*/S.Class("RealtimeSessionCreateRequest")({
|
|
3042
|
+
"model": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestModel, {
|
|
3043
|
+
nullable: true
|
|
3044
|
+
}),
|
|
3045
|
+
"instructions": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3046
|
+
nullable: true
|
|
3047
|
+
}),
|
|
3048
|
+
"voice": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestVoice, {
|
|
3049
|
+
nullable: true
|
|
3050
|
+
}),
|
|
3051
|
+
"input_audio_format": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestInputAudioFormat, {
|
|
3052
|
+
nullable: true
|
|
3053
|
+
}),
|
|
3054
|
+
"output_audio_format": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestOutputAudioFormat, {
|
|
3055
|
+
nullable: true
|
|
3056
|
+
}),
|
|
3057
|
+
"input_audio_transcription": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
3058
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3059
|
+
nullable: true
|
|
3060
|
+
})
|
|
3061
|
+
}), {
|
|
3062
|
+
nullable: true
|
|
3063
|
+
}),
|
|
3064
|
+
"turn_detection": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
3065
|
+
"type": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3066
|
+
nullable: true
|
|
3067
|
+
}),
|
|
3068
|
+
"threshold": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
3069
|
+
nullable: true
|
|
3070
|
+
}),
|
|
3071
|
+
"prefix_padding_ms": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
3072
|
+
nullable: true
|
|
3073
|
+
}),
|
|
3074
|
+
"silence_duration_ms": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
3075
|
+
nullable: true
|
|
3076
|
+
}),
|
|
3077
|
+
"create_response": /*#__PURE__*/S.optionalWith(S.Boolean, {
|
|
3078
|
+
nullable: true,
|
|
3079
|
+
default: () => true
|
|
3080
|
+
})
|
|
3081
|
+
}), {
|
|
3082
|
+
nullable: true
|
|
3083
|
+
}),
|
|
3084
|
+
"tools": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
3085
|
+
"type": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateRequestToolsType, {
|
|
3086
|
+
nullable: true
|
|
3087
|
+
}),
|
|
3088
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3089
|
+
nullable: true
|
|
3090
|
+
}),
|
|
3091
|
+
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3092
|
+
nullable: true
|
|
3093
|
+
}),
|
|
3094
|
+
"parameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
3095
|
+
key: S.String,
|
|
3096
|
+
value: S.Unknown
|
|
3097
|
+
}), {
|
|
3098
|
+
nullable: true
|
|
3099
|
+
})
|
|
3100
|
+
})), {
|
|
3101
|
+
nullable: true
|
|
3102
|
+
}),
|
|
3103
|
+
"tool_choice": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3104
|
+
nullable: true
|
|
3105
|
+
}),
|
|
3106
|
+
"temperature": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
3107
|
+
nullable: true
|
|
3108
|
+
}),
|
|
3109
|
+
"max_response_output_tokens": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.Int, RealtimeSessionCreateRequestMaxResponseOutputTokens), {
|
|
3110
|
+
nullable: true
|
|
3111
|
+
})
|
|
3112
|
+
}) {}
|
|
3113
|
+
exports.RealtimeSessionCreateRequest = RealtimeSessionCreateRequest;
|
|
3114
|
+
class RealtimeSessionCreateResponseVoice extends /*#__PURE__*/S.Literal("alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse") {}
|
|
3115
|
+
exports.RealtimeSessionCreateResponseVoice = RealtimeSessionCreateResponseVoice;
|
|
3116
|
+
class RealtimeSessionCreateResponseToolsType extends /*#__PURE__*/S.Literal("function") {}
|
|
3117
|
+
exports.RealtimeSessionCreateResponseToolsType = RealtimeSessionCreateResponseToolsType;
|
|
3118
|
+
class RealtimeSessionCreateResponseMaxResponseOutputTokens extends /*#__PURE__*/S.Literal("inf") {}
|
|
3119
|
+
exports.RealtimeSessionCreateResponseMaxResponseOutputTokens = RealtimeSessionCreateResponseMaxResponseOutputTokens;
|
|
3120
|
+
class RealtimeSessionCreateResponse extends /*#__PURE__*/S.Class("RealtimeSessionCreateResponse")({
|
|
3121
|
+
"client_secret": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
3122
|
+
"value": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3123
|
+
nullable: true
|
|
3124
|
+
}),
|
|
3125
|
+
"expires_at": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
3126
|
+
nullable: true
|
|
3127
|
+
})
|
|
3128
|
+
}), {
|
|
3129
|
+
nullable: true
|
|
3130
|
+
}),
|
|
3131
|
+
"instructions": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3132
|
+
nullable: true
|
|
3133
|
+
}),
|
|
3134
|
+
"voice": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateResponseVoice, {
|
|
3135
|
+
nullable: true
|
|
3136
|
+
}),
|
|
3137
|
+
"input_audio_format": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3138
|
+
nullable: true
|
|
3139
|
+
}),
|
|
3140
|
+
"output_audio_format": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3141
|
+
nullable: true
|
|
3142
|
+
}),
|
|
3143
|
+
"input_audio_transcription": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
3144
|
+
"model": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3145
|
+
nullable: true
|
|
3146
|
+
})
|
|
3147
|
+
}), {
|
|
3148
|
+
nullable: true
|
|
3149
|
+
}),
|
|
3150
|
+
"turn_detection": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
3151
|
+
"type": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3152
|
+
nullable: true
|
|
3153
|
+
}),
|
|
3154
|
+
"threshold": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
3155
|
+
nullable: true
|
|
3156
|
+
}),
|
|
3157
|
+
"prefix_padding_ms": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
3158
|
+
nullable: true
|
|
3159
|
+
}),
|
|
3160
|
+
"silence_duration_ms": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
3161
|
+
nullable: true
|
|
3162
|
+
})
|
|
3163
|
+
}), {
|
|
3164
|
+
nullable: true
|
|
3165
|
+
}),
|
|
3166
|
+
"tools": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
3167
|
+
"type": /*#__PURE__*/S.optionalWith(RealtimeSessionCreateResponseToolsType, {
|
|
3168
|
+
nullable: true
|
|
3169
|
+
}),
|
|
3170
|
+
"name": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3171
|
+
nullable: true
|
|
3172
|
+
}),
|
|
3173
|
+
"description": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3174
|
+
nullable: true
|
|
3175
|
+
}),
|
|
3176
|
+
"parameters": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
3177
|
+
key: S.String,
|
|
3178
|
+
value: S.Unknown
|
|
3179
|
+
}), {
|
|
3180
|
+
nullable: true
|
|
3181
|
+
})
|
|
3182
|
+
})), {
|
|
3183
|
+
nullable: true
|
|
3184
|
+
}),
|
|
3185
|
+
"tool_choice": /*#__PURE__*/S.optionalWith(S.String, {
|
|
3186
|
+
nullable: true
|
|
3187
|
+
}),
|
|
3188
|
+
"temperature": /*#__PURE__*/S.optionalWith(S.Number, {
|
|
3189
|
+
nullable: true
|
|
3190
|
+
}),
|
|
3191
|
+
"max_response_output_tokens": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.Int, RealtimeSessionCreateResponseMaxResponseOutputTokens), {
|
|
3192
|
+
nullable: true
|
|
3193
|
+
})
|
|
3194
|
+
}) {}
|
|
3195
|
+
exports.RealtimeSessionCreateResponse = RealtimeSessionCreateResponse;
|
|
3196
|
+
class CreateMessageRequestRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
|
|
3197
|
+
exports.CreateMessageRequestRole = CreateMessageRequestRole;
|
|
3198
|
+
class MessageContentImageFileObjectType extends /*#__PURE__*/S.Literal("image_file") {}
|
|
3199
|
+
exports.MessageContentImageFileObjectType = MessageContentImageFileObjectType;
|
|
3200
|
+
class MessageContentImageFileObjectImageFileDetail extends /*#__PURE__*/S.Literal("auto", "low", "high") {}
|
|
3201
|
+
exports.MessageContentImageFileObjectImageFileDetail = MessageContentImageFileObjectImageFileDetail;
|
|
1913
3202
|
class MessageContentImageFileObject extends /*#__PURE__*/S.Struct({
|
|
1914
|
-
"type":
|
|
3203
|
+
"type": MessageContentImageFileObjectType,
|
|
1915
3204
|
"image_file": /*#__PURE__*/S.Struct({
|
|
1916
3205
|
"file_id": S.String,
|
|
1917
|
-
"detail": /*#__PURE__*/S.optionalWith(
|
|
3206
|
+
"detail": /*#__PURE__*/S.optionalWith(MessageContentImageFileObjectImageFileDetail, {
|
|
1918
3207
|
nullable: true,
|
|
1919
3208
|
default: () => "auto"
|
|
1920
3209
|
})
|
|
1921
3210
|
})
|
|
1922
3211
|
}) {}
|
|
1923
3212
|
exports.MessageContentImageFileObject = MessageContentImageFileObject;
|
|
3213
|
+
class MessageContentImageUrlObjectType extends /*#__PURE__*/S.Literal("image_url") {}
|
|
3214
|
+
exports.MessageContentImageUrlObjectType = MessageContentImageUrlObjectType;
|
|
3215
|
+
class MessageContentImageUrlObjectImageUrlDetail extends /*#__PURE__*/S.Literal("auto", "low", "high") {}
|
|
3216
|
+
exports.MessageContentImageUrlObjectImageUrlDetail = MessageContentImageUrlObjectImageUrlDetail;
|
|
1924
3217
|
class MessageContentImageUrlObject extends /*#__PURE__*/S.Struct({
|
|
1925
|
-
"type":
|
|
3218
|
+
"type": MessageContentImageUrlObjectType,
|
|
1926
3219
|
"image_url": /*#__PURE__*/S.Struct({
|
|
1927
3220
|
"url": S.String,
|
|
1928
|
-
"detail": /*#__PURE__*/S.optionalWith(
|
|
3221
|
+
"detail": /*#__PURE__*/S.optionalWith(MessageContentImageUrlObjectImageUrlDetail, {
|
|
1929
3222
|
nullable: true,
|
|
1930
3223
|
default: () => "auto"
|
|
1931
3224
|
})
|
|
1932
3225
|
})
|
|
1933
3226
|
}) {}
|
|
1934
3227
|
exports.MessageContentImageUrlObject = MessageContentImageUrlObject;
|
|
3228
|
+
class MessageRequestContentTextObjectType extends /*#__PURE__*/S.Literal("text") {}
|
|
3229
|
+
exports.MessageRequestContentTextObjectType = MessageRequestContentTextObjectType;
|
|
1935
3230
|
class MessageRequestContentTextObject extends /*#__PURE__*/S.Struct({
|
|
1936
|
-
"type":
|
|
3231
|
+
"type": MessageRequestContentTextObjectType,
|
|
1937
3232
|
"text": S.String
|
|
1938
3233
|
}) {}
|
|
1939
3234
|
exports.MessageRequestContentTextObject = MessageRequestContentTextObject;
|
|
3235
|
+
class AssistantToolsFileSearchTypeOnlyType extends /*#__PURE__*/S.Literal("file_search") {}
|
|
3236
|
+
exports.AssistantToolsFileSearchTypeOnlyType = AssistantToolsFileSearchTypeOnlyType;
|
|
1940
3237
|
class AssistantToolsFileSearchTypeOnly extends /*#__PURE__*/S.Struct({
|
|
1941
|
-
"type":
|
|
3238
|
+
"type": AssistantToolsFileSearchTypeOnlyType
|
|
1942
3239
|
}) {}
|
|
1943
3240
|
exports.AssistantToolsFileSearchTypeOnly = AssistantToolsFileSearchTypeOnly;
|
|
1944
3241
|
class CreateMessageRequest extends /*#__PURE__*/S.Struct({
|
|
1945
|
-
"role":
|
|
3242
|
+
"role": CreateMessageRequestRole,
|
|
1946
3243
|
"content": /*#__PURE__*/S.Union(S.String, /*#__PURE__*/S.NonEmptyArray( /*#__PURE__*/S.Union(MessageContentImageFileObject, MessageContentImageUrlObject, MessageRequestContentTextObject))),
|
|
1947
3244
|
"attachments": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
1948
3245
|
"file_id": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -1962,6 +3259,8 @@ class CreateMessageRequest extends /*#__PURE__*/S.Struct({
|
|
|
1962
3259
|
})
|
|
1963
3260
|
}) {}
|
|
1964
3261
|
exports.CreateMessageRequest = CreateMessageRequest;
|
|
3262
|
+
class CreateThreadRequestToolResourcesFileSearchVectorStoresChunkingStrategyType extends /*#__PURE__*/S.Literal("static") {}
|
|
3263
|
+
exports.CreateThreadRequestToolResourcesFileSearchVectorStoresChunkingStrategyType = CreateThreadRequestToolResourcesFileSearchVectorStoresChunkingStrategyType;
|
|
1965
3264
|
class CreateThreadRequest extends /*#__PURE__*/S.Class("CreateThreadRequest")({
|
|
1966
3265
|
"messages": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(CreateMessageRequest), {
|
|
1967
3266
|
nullable: true
|
|
@@ -2012,9 +3311,11 @@ class CreateThreadRequest extends /*#__PURE__*/S.Class("CreateThreadRequest")({
|
|
|
2012
3311
|
})
|
|
2013
3312
|
}) {}
|
|
2014
3313
|
exports.CreateThreadRequest = CreateThreadRequest;
|
|
3314
|
+
class ThreadObjectObject extends /*#__PURE__*/S.Literal("thread") {}
|
|
3315
|
+
exports.ThreadObjectObject = ThreadObjectObject;
|
|
2015
3316
|
class ThreadObject extends /*#__PURE__*/S.Class("ThreadObject")({
|
|
2016
3317
|
"id": S.String,
|
|
2017
|
-
"object":
|
|
3318
|
+
"object": ThreadObjectObject,
|
|
2018
3319
|
"created_at": S.Int,
|
|
2019
3320
|
"tool_resources": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2020
3321
|
"code_interpreter": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
@@ -2039,15 +3340,21 @@ class ThreadObject extends /*#__PURE__*/S.Class("ThreadObject")({
|
|
|
2039
3340
|
}))
|
|
2040
3341
|
}) {}
|
|
2041
3342
|
exports.ThreadObject = ThreadObject;
|
|
3343
|
+
class CreateThreadAndRunRequestModel extends /*#__PURE__*/S.Literal("gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613") {}
|
|
3344
|
+
exports.CreateThreadAndRunRequestModel = CreateThreadAndRunRequestModel;
|
|
3345
|
+
class TruncationObjectType extends /*#__PURE__*/S.Literal("auto", "last_messages") {}
|
|
3346
|
+
exports.TruncationObjectType = TruncationObjectType;
|
|
2042
3347
|
class TruncationObject extends /*#__PURE__*/S.Struct({
|
|
2043
|
-
"type":
|
|
3348
|
+
"type": TruncationObjectType,
|
|
2044
3349
|
"last_messages": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1)), {
|
|
2045
3350
|
nullable: true
|
|
2046
3351
|
})
|
|
2047
3352
|
}) {}
|
|
2048
3353
|
exports.TruncationObject = TruncationObject;
|
|
3354
|
+
class AssistantsNamedToolChoiceType extends /*#__PURE__*/S.Literal("function", "code_interpreter", "file_search") {}
|
|
3355
|
+
exports.AssistantsNamedToolChoiceType = AssistantsNamedToolChoiceType;
|
|
2049
3356
|
class AssistantsNamedToolChoice extends /*#__PURE__*/S.Struct({
|
|
2050
|
-
"type":
|
|
3357
|
+
"type": AssistantsNamedToolChoiceType,
|
|
2051
3358
|
"function": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Struct({
|
|
2052
3359
|
"name": S.String
|
|
2053
3360
|
}), {
|
|
@@ -2062,7 +3369,7 @@ class CreateThreadAndRunRequest extends /*#__PURE__*/S.Class("CreateThreadAndRun
|
|
|
2062
3369
|
"thread": /*#__PURE__*/S.optionalWith(CreateThreadRequest, {
|
|
2063
3370
|
nullable: true
|
|
2064
3371
|
}),
|
|
2065
|
-
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String,
|
|
3372
|
+
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, CreateThreadAndRunRequestModel), {
|
|
2066
3373
|
nullable: true
|
|
2067
3374
|
}),
|
|
2068
3375
|
"instructions": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -2128,15 +3435,27 @@ class CreateThreadAndRunRequest extends /*#__PURE__*/S.Class("CreateThreadAndRun
|
|
|
2128
3435
|
})
|
|
2129
3436
|
}) {}
|
|
2130
3437
|
exports.CreateThreadAndRunRequest = CreateThreadAndRunRequest;
|
|
3438
|
+
class RunObjectObject extends /*#__PURE__*/S.Literal("thread.run") {}
|
|
3439
|
+
exports.RunObjectObject = RunObjectObject;
|
|
3440
|
+
class RunObjectStatus extends /*#__PURE__*/S.Literal("queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "incomplete", "expired") {}
|
|
3441
|
+
exports.RunObjectStatus = RunObjectStatus;
|
|
3442
|
+
class RunObjectRequiredActionType extends /*#__PURE__*/S.Literal("submit_tool_outputs") {}
|
|
3443
|
+
exports.RunObjectRequiredActionType = RunObjectRequiredActionType;
|
|
3444
|
+
class RunToolCallObjectType extends /*#__PURE__*/S.Literal("function") {}
|
|
3445
|
+
exports.RunToolCallObjectType = RunToolCallObjectType;
|
|
2131
3446
|
class RunToolCallObject extends /*#__PURE__*/S.Struct({
|
|
2132
3447
|
"id": S.String,
|
|
2133
|
-
"type":
|
|
3448
|
+
"type": RunToolCallObjectType,
|
|
2134
3449
|
"function": /*#__PURE__*/S.Struct({
|
|
2135
3450
|
"name": S.String,
|
|
2136
3451
|
"arguments": S.String
|
|
2137
3452
|
})
|
|
2138
3453
|
}) {}
|
|
2139
3454
|
exports.RunToolCallObject = RunToolCallObject;
|
|
3455
|
+
class RunObjectLastErrorCode extends /*#__PURE__*/S.Literal("server_error", "rate_limit_exceeded", "invalid_prompt") {}
|
|
3456
|
+
exports.RunObjectLastErrorCode = RunObjectLastErrorCode;
|
|
3457
|
+
class RunObjectIncompleteDetailsReason extends /*#__PURE__*/S.Literal("max_completion_tokens", "max_prompt_tokens") {}
|
|
3458
|
+
exports.RunObjectIncompleteDetailsReason = RunObjectIncompleteDetailsReason;
|
|
2140
3459
|
class RunCompletionUsage extends /*#__PURE__*/S.Struct({
|
|
2141
3460
|
"completion_tokens": S.Int,
|
|
2142
3461
|
"prompt_tokens": S.Int,
|
|
@@ -2145,19 +3464,19 @@ class RunCompletionUsage extends /*#__PURE__*/S.Struct({
|
|
|
2145
3464
|
exports.RunCompletionUsage = RunCompletionUsage;
|
|
2146
3465
|
class RunObject extends /*#__PURE__*/S.Class("RunObject")({
|
|
2147
3466
|
"id": S.String,
|
|
2148
|
-
"object":
|
|
3467
|
+
"object": RunObjectObject,
|
|
2149
3468
|
"created_at": S.Int,
|
|
2150
3469
|
"thread_id": S.String,
|
|
2151
3470
|
"assistant_id": S.String,
|
|
2152
|
-
"status":
|
|
3471
|
+
"status": RunObjectStatus,
|
|
2153
3472
|
"required_action": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2154
|
-
"type":
|
|
3473
|
+
"type": RunObjectRequiredActionType,
|
|
2155
3474
|
"submit_tool_outputs": /*#__PURE__*/S.Struct({
|
|
2156
3475
|
"tool_calls": /*#__PURE__*/S.Array(RunToolCallObject)
|
|
2157
3476
|
})
|
|
2158
3477
|
})),
|
|
2159
3478
|
"last_error": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2160
|
-
"code":
|
|
3479
|
+
"code": RunObjectLastErrorCode,
|
|
2161
3480
|
"message": S.String
|
|
2162
3481
|
})),
|
|
2163
3482
|
"expires_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
@@ -2166,7 +3485,7 @@ class RunObject extends /*#__PURE__*/S.Class("RunObject")({
|
|
|
2166
3485
|
"failed_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
2167
3486
|
"completed_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
2168
3487
|
"incomplete_details": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2169
|
-
"reason": /*#__PURE__*/S.optionalWith(
|
|
3488
|
+
"reason": /*#__PURE__*/S.optionalWith(RunObjectIncompleteDetailsReason, {
|
|
2170
3489
|
nullable: true
|
|
2171
3490
|
})
|
|
2172
3491
|
})),
|
|
@@ -2220,18 +3539,22 @@ class ModifyThreadRequest extends /*#__PURE__*/S.Class("ModifyThreadRequest")({
|
|
|
2220
3539
|
})
|
|
2221
3540
|
}) {}
|
|
2222
3541
|
exports.ModifyThreadRequest = ModifyThreadRequest;
|
|
3542
|
+
class DeleteThreadResponseObject extends /*#__PURE__*/S.Literal("thread.deleted") {}
|
|
3543
|
+
exports.DeleteThreadResponseObject = DeleteThreadResponseObject;
|
|
2223
3544
|
class DeleteThreadResponse extends /*#__PURE__*/S.Class("DeleteThreadResponse")({
|
|
2224
3545
|
"id": S.String,
|
|
2225
3546
|
"deleted": S.Boolean,
|
|
2226
|
-
"object":
|
|
3547
|
+
"object": DeleteThreadResponseObject
|
|
2227
3548
|
}) {}
|
|
2228
3549
|
exports.DeleteThreadResponse = DeleteThreadResponse;
|
|
3550
|
+
class ListMessagesParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
3551
|
+
exports.ListMessagesParamsOrder = ListMessagesParamsOrder;
|
|
2229
3552
|
class ListMessagesParams extends /*#__PURE__*/S.Struct({
|
|
2230
3553
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2231
3554
|
nullable: true,
|
|
2232
3555
|
default: () => 20
|
|
2233
3556
|
}),
|
|
2234
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
3557
|
+
"order": /*#__PURE__*/S.optionalWith(ListMessagesParamsOrder, {
|
|
2235
3558
|
nullable: true,
|
|
2236
3559
|
default: () => "desc"
|
|
2237
3560
|
}),
|
|
@@ -2246,8 +3569,20 @@ class ListMessagesParams extends /*#__PURE__*/S.Struct({
|
|
|
2246
3569
|
})
|
|
2247
3570
|
}) {}
|
|
2248
3571
|
exports.ListMessagesParams = ListMessagesParams;
|
|
3572
|
+
class MessageObjectObject extends /*#__PURE__*/S.Literal("thread.message") {}
|
|
3573
|
+
exports.MessageObjectObject = MessageObjectObject;
|
|
3574
|
+
class MessageObjectStatus extends /*#__PURE__*/S.Literal("in_progress", "incomplete", "completed") {}
|
|
3575
|
+
exports.MessageObjectStatus = MessageObjectStatus;
|
|
3576
|
+
class MessageObjectIncompleteDetailsReason extends /*#__PURE__*/S.Literal("content_filter", "max_tokens", "run_cancelled", "run_expired", "run_failed") {}
|
|
3577
|
+
exports.MessageObjectIncompleteDetailsReason = MessageObjectIncompleteDetailsReason;
|
|
3578
|
+
class MessageObjectRole extends /*#__PURE__*/S.Literal("user", "assistant") {}
|
|
3579
|
+
exports.MessageObjectRole = MessageObjectRole;
|
|
3580
|
+
class MessageContentTextObjectType extends /*#__PURE__*/S.Literal("text") {}
|
|
3581
|
+
exports.MessageContentTextObjectType = MessageContentTextObjectType;
|
|
3582
|
+
class MessageContentTextAnnotationsFileCitationObjectType extends /*#__PURE__*/S.Literal("file_citation") {}
|
|
3583
|
+
exports.MessageContentTextAnnotationsFileCitationObjectType = MessageContentTextAnnotationsFileCitationObjectType;
|
|
2249
3584
|
class MessageContentTextAnnotationsFileCitationObject extends /*#__PURE__*/S.Struct({
|
|
2250
|
-
"type":
|
|
3585
|
+
"type": MessageContentTextAnnotationsFileCitationObjectType,
|
|
2251
3586
|
"text": S.String,
|
|
2252
3587
|
"file_citation": /*#__PURE__*/S.Struct({
|
|
2253
3588
|
"file_id": S.String
|
|
@@ -2256,8 +3591,10 @@ class MessageContentTextAnnotationsFileCitationObject extends /*#__PURE__*/S.Str
|
|
|
2256
3591
|
"end_index": /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0))
|
|
2257
3592
|
}) {}
|
|
2258
3593
|
exports.MessageContentTextAnnotationsFileCitationObject = MessageContentTextAnnotationsFileCitationObject;
|
|
3594
|
+
class MessageContentTextAnnotationsFilePathObjectType extends /*#__PURE__*/S.Literal("file_path") {}
|
|
3595
|
+
exports.MessageContentTextAnnotationsFilePathObjectType = MessageContentTextAnnotationsFilePathObjectType;
|
|
2259
3596
|
class MessageContentTextAnnotationsFilePathObject extends /*#__PURE__*/S.Struct({
|
|
2260
|
-
"type":
|
|
3597
|
+
"type": MessageContentTextAnnotationsFilePathObjectType,
|
|
2261
3598
|
"text": S.String,
|
|
2262
3599
|
"file_path": /*#__PURE__*/S.Struct({
|
|
2263
3600
|
"file_id": S.String
|
|
@@ -2267,30 +3604,32 @@ class MessageContentTextAnnotationsFilePathObject extends /*#__PURE__*/S.Struct(
|
|
|
2267
3604
|
}) {}
|
|
2268
3605
|
exports.MessageContentTextAnnotationsFilePathObject = MessageContentTextAnnotationsFilePathObject;
|
|
2269
3606
|
class MessageContentTextObject extends /*#__PURE__*/S.Struct({
|
|
2270
|
-
"type":
|
|
3607
|
+
"type": MessageContentTextObjectType,
|
|
2271
3608
|
"text": /*#__PURE__*/S.Struct({
|
|
2272
3609
|
"value": S.String,
|
|
2273
3610
|
"annotations": /*#__PURE__*/S.Array( /*#__PURE__*/S.Union(MessageContentTextAnnotationsFileCitationObject, MessageContentTextAnnotationsFilePathObject))
|
|
2274
3611
|
})
|
|
2275
3612
|
}) {}
|
|
2276
3613
|
exports.MessageContentTextObject = MessageContentTextObject;
|
|
3614
|
+
class MessageContentRefusalObjectType extends /*#__PURE__*/S.Literal("refusal") {}
|
|
3615
|
+
exports.MessageContentRefusalObjectType = MessageContentRefusalObjectType;
|
|
2277
3616
|
class MessageContentRefusalObject extends /*#__PURE__*/S.Struct({
|
|
2278
|
-
"type":
|
|
3617
|
+
"type": MessageContentRefusalObjectType,
|
|
2279
3618
|
"refusal": S.String
|
|
2280
3619
|
}) {}
|
|
2281
3620
|
exports.MessageContentRefusalObject = MessageContentRefusalObject;
|
|
2282
3621
|
class MessageObject extends /*#__PURE__*/S.Struct({
|
|
2283
3622
|
"id": S.String,
|
|
2284
|
-
"object":
|
|
3623
|
+
"object": MessageObjectObject,
|
|
2285
3624
|
"created_at": S.Int,
|
|
2286
3625
|
"thread_id": S.String,
|
|
2287
|
-
"status":
|
|
3626
|
+
"status": MessageObjectStatus,
|
|
2288
3627
|
"incomplete_details": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2289
|
-
"reason":
|
|
3628
|
+
"reason": MessageObjectIncompleteDetailsReason
|
|
2290
3629
|
})),
|
|
2291
3630
|
"completed_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
2292
3631
|
"incomplete_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
2293
|
-
"role":
|
|
3632
|
+
"role": MessageObjectRole,
|
|
2294
3633
|
"content": /*#__PURE__*/S.Array( /*#__PURE__*/S.Union(MessageContentImageFileObject, MessageContentImageUrlObject, MessageContentTextObject, MessageContentRefusalObject)),
|
|
2295
3634
|
"assistant_id": /*#__PURE__*/S.NullOr(S.String),
|
|
2296
3635
|
"run_id": /*#__PURE__*/S.NullOr(S.String),
|
|
@@ -2325,18 +3664,22 @@ class ModifyMessageRequest extends /*#__PURE__*/S.Class("ModifyMessageRequest")(
|
|
|
2325
3664
|
})
|
|
2326
3665
|
}) {}
|
|
2327
3666
|
exports.ModifyMessageRequest = ModifyMessageRequest;
|
|
3667
|
+
class DeleteMessageResponseObject extends /*#__PURE__*/S.Literal("thread.message.deleted") {}
|
|
3668
|
+
exports.DeleteMessageResponseObject = DeleteMessageResponseObject;
|
|
2328
3669
|
class DeleteMessageResponse extends /*#__PURE__*/S.Class("DeleteMessageResponse")({
|
|
2329
3670
|
"id": S.String,
|
|
2330
3671
|
"deleted": S.Boolean,
|
|
2331
|
-
"object":
|
|
3672
|
+
"object": DeleteMessageResponseObject
|
|
2332
3673
|
}) {}
|
|
2333
3674
|
exports.DeleteMessageResponse = DeleteMessageResponse;
|
|
3675
|
+
class ListRunsParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
3676
|
+
exports.ListRunsParamsOrder = ListRunsParamsOrder;
|
|
2334
3677
|
class ListRunsParams extends /*#__PURE__*/S.Struct({
|
|
2335
3678
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2336
3679
|
nullable: true,
|
|
2337
3680
|
default: () => 20
|
|
2338
3681
|
}),
|
|
2339
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
3682
|
+
"order": /*#__PURE__*/S.optionalWith(ListRunsParamsOrder, {
|
|
2340
3683
|
nullable: true,
|
|
2341
3684
|
default: () => "desc"
|
|
2342
3685
|
}),
|
|
@@ -2356,15 +3699,19 @@ class ListRunsResponse extends /*#__PURE__*/S.Class("ListRunsResponse")({
|
|
|
2356
3699
|
"has_more": S.Boolean
|
|
2357
3700
|
}) {}
|
|
2358
3701
|
exports.ListRunsResponse = ListRunsResponse;
|
|
3702
|
+
class CreateRunParamsInclude extends /*#__PURE__*/S.Literal("step_details.tool_calls[*].file_search.results[*].content") {}
|
|
3703
|
+
exports.CreateRunParamsInclude = CreateRunParamsInclude;
|
|
2359
3704
|
class CreateRunParams extends /*#__PURE__*/S.Struct({
|
|
2360
|
-
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(
|
|
3705
|
+
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(CreateRunParamsInclude), {
|
|
2361
3706
|
nullable: true
|
|
2362
3707
|
})
|
|
2363
3708
|
}) {}
|
|
2364
3709
|
exports.CreateRunParams = CreateRunParams;
|
|
3710
|
+
class CreateRunRequestModel extends /*#__PURE__*/S.Literal("gpt-4o", "gpt-4o-2024-11-20", "gpt-4o-2024-08-06", "gpt-4o-2024-05-13", "gpt-4o-mini", "gpt-4o-mini-2024-07-18", "gpt-4-turbo", "gpt-4-turbo-2024-04-09", "gpt-4-0125-preview", "gpt-4-turbo-preview", "gpt-4-1106-preview", "gpt-4-vision-preview", "gpt-4", "gpt-4-0314", "gpt-4-0613", "gpt-4-32k", "gpt-4-32k-0314", "gpt-4-32k-0613", "gpt-3.5-turbo", "gpt-3.5-turbo-16k", "gpt-3.5-turbo-0613", "gpt-3.5-turbo-1106", "gpt-3.5-turbo-0125", "gpt-3.5-turbo-16k-0613") {}
|
|
3711
|
+
exports.CreateRunRequestModel = CreateRunRequestModel;
|
|
2365
3712
|
class CreateRunRequest extends /*#__PURE__*/S.Class("CreateRunRequest")({
|
|
2366
3713
|
"assistant_id": S.String,
|
|
2367
|
-
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String,
|
|
3714
|
+
"model": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Union(S.String, CreateRunRequestModel), {
|
|
2368
3715
|
nullable: true
|
|
2369
3716
|
}),
|
|
2370
3717
|
"instructions": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -2426,12 +3773,16 @@ class ModifyRunRequest extends /*#__PURE__*/S.Class("ModifyRunRequest")({
|
|
|
2426
3773
|
})
|
|
2427
3774
|
}) {}
|
|
2428
3775
|
exports.ModifyRunRequest = ModifyRunRequest;
|
|
3776
|
+
class ListRunStepsParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
3777
|
+
exports.ListRunStepsParamsOrder = ListRunStepsParamsOrder;
|
|
3778
|
+
class ListRunStepsParamsInclude extends /*#__PURE__*/S.Literal("step_details.tool_calls[*].file_search.results[*].content") {}
|
|
3779
|
+
exports.ListRunStepsParamsInclude = ListRunStepsParamsInclude;
|
|
2429
3780
|
class ListRunStepsParams extends /*#__PURE__*/S.Struct({
|
|
2430
3781
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2431
3782
|
nullable: true,
|
|
2432
3783
|
default: () => 20
|
|
2433
3784
|
}),
|
|
2434
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
3785
|
+
"order": /*#__PURE__*/S.optionalWith(ListRunStepsParamsOrder, {
|
|
2435
3786
|
nullable: true,
|
|
2436
3787
|
default: () => "desc"
|
|
2437
3788
|
}),
|
|
@@ -2441,25 +3792,41 @@ class ListRunStepsParams extends /*#__PURE__*/S.Struct({
|
|
|
2441
3792
|
"before": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2442
3793
|
nullable: true
|
|
2443
3794
|
}),
|
|
2444
|
-
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(
|
|
3795
|
+
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(ListRunStepsParamsInclude), {
|
|
2445
3796
|
nullable: true
|
|
2446
3797
|
})
|
|
2447
3798
|
}) {}
|
|
2448
3799
|
exports.ListRunStepsParams = ListRunStepsParams;
|
|
3800
|
+
class RunStepObjectObject extends /*#__PURE__*/S.Literal("thread.run.step") {}
|
|
3801
|
+
exports.RunStepObjectObject = RunStepObjectObject;
|
|
3802
|
+
class RunStepObjectType extends /*#__PURE__*/S.Literal("message_creation", "tool_calls") {}
|
|
3803
|
+
exports.RunStepObjectType = RunStepObjectType;
|
|
3804
|
+
class RunStepObjectStatus extends /*#__PURE__*/S.Literal("in_progress", "cancelled", "failed", "completed", "expired") {}
|
|
3805
|
+
exports.RunStepObjectStatus = RunStepObjectStatus;
|
|
3806
|
+
class RunStepDetailsMessageCreationObjectType extends /*#__PURE__*/S.Literal("message_creation") {}
|
|
3807
|
+
exports.RunStepDetailsMessageCreationObjectType = RunStepDetailsMessageCreationObjectType;
|
|
2449
3808
|
class RunStepDetailsMessageCreationObject extends /*#__PURE__*/S.Struct({
|
|
2450
|
-
"type":
|
|
3809
|
+
"type": RunStepDetailsMessageCreationObjectType,
|
|
2451
3810
|
"message_creation": /*#__PURE__*/S.Struct({
|
|
2452
3811
|
"message_id": S.String
|
|
2453
3812
|
})
|
|
2454
3813
|
}) {}
|
|
2455
3814
|
exports.RunStepDetailsMessageCreationObject = RunStepDetailsMessageCreationObject;
|
|
3815
|
+
class RunStepDetailsToolCallsObjectType extends /*#__PURE__*/S.Literal("tool_calls") {}
|
|
3816
|
+
exports.RunStepDetailsToolCallsObjectType = RunStepDetailsToolCallsObjectType;
|
|
3817
|
+
class RunStepDetailsToolCallsCodeObjectType extends /*#__PURE__*/S.Literal("code_interpreter") {}
|
|
3818
|
+
exports.RunStepDetailsToolCallsCodeObjectType = RunStepDetailsToolCallsCodeObjectType;
|
|
3819
|
+
class RunStepDetailsToolCallsCodeOutputLogsObjectType extends /*#__PURE__*/S.Literal("logs") {}
|
|
3820
|
+
exports.RunStepDetailsToolCallsCodeOutputLogsObjectType = RunStepDetailsToolCallsCodeOutputLogsObjectType;
|
|
2456
3821
|
class RunStepDetailsToolCallsCodeOutputLogsObject extends /*#__PURE__*/S.Struct({
|
|
2457
|
-
"type":
|
|
3822
|
+
"type": RunStepDetailsToolCallsCodeOutputLogsObjectType,
|
|
2458
3823
|
"logs": S.String
|
|
2459
3824
|
}) {}
|
|
2460
3825
|
exports.RunStepDetailsToolCallsCodeOutputLogsObject = RunStepDetailsToolCallsCodeOutputLogsObject;
|
|
3826
|
+
class RunStepDetailsToolCallsCodeOutputImageObjectType extends /*#__PURE__*/S.Literal("image") {}
|
|
3827
|
+
exports.RunStepDetailsToolCallsCodeOutputImageObjectType = RunStepDetailsToolCallsCodeOutputImageObjectType;
|
|
2461
3828
|
class RunStepDetailsToolCallsCodeOutputImageObject extends /*#__PURE__*/S.Struct({
|
|
2462
|
-
"type":
|
|
3829
|
+
"type": RunStepDetailsToolCallsCodeOutputImageObjectType,
|
|
2463
3830
|
"image": /*#__PURE__*/S.Struct({
|
|
2464
3831
|
"file_id": S.String
|
|
2465
3832
|
})
|
|
@@ -2467,7 +3834,7 @@ class RunStepDetailsToolCallsCodeOutputImageObject extends /*#__PURE__*/S.Struct
|
|
|
2467
3834
|
exports.RunStepDetailsToolCallsCodeOutputImageObject = RunStepDetailsToolCallsCodeOutputImageObject;
|
|
2468
3835
|
class RunStepDetailsToolCallsCodeObject extends /*#__PURE__*/S.Struct({
|
|
2469
3836
|
"id": S.String,
|
|
2470
|
-
"type":
|
|
3837
|
+
"type": RunStepDetailsToolCallsCodeObjectType,
|
|
2471
3838
|
"code_interpreter": /*#__PURE__*/S.Struct({
|
|
2472
3839
|
"input": S.String,
|
|
2473
3840
|
"outputs": /*#__PURE__*/S.Array( /*#__PURE__*/S.Record({
|
|
@@ -2477,17 +3844,23 @@ class RunStepDetailsToolCallsCodeObject extends /*#__PURE__*/S.Struct({
|
|
|
2477
3844
|
})
|
|
2478
3845
|
}) {}
|
|
2479
3846
|
exports.RunStepDetailsToolCallsCodeObject = RunStepDetailsToolCallsCodeObject;
|
|
3847
|
+
class RunStepDetailsToolCallsFileSearchObjectType extends /*#__PURE__*/S.Literal("file_search") {}
|
|
3848
|
+
exports.RunStepDetailsToolCallsFileSearchObjectType = RunStepDetailsToolCallsFileSearchObjectType;
|
|
3849
|
+
class RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker extends /*#__PURE__*/S.Literal("default_2024_08_21") {}
|
|
3850
|
+
exports.RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker = RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker;
|
|
2480
3851
|
class RunStepDetailsToolCallsFileSearchRankingOptionsObject extends /*#__PURE__*/S.Struct({
|
|
2481
|
-
"ranker":
|
|
3852
|
+
"ranker": RunStepDetailsToolCallsFileSearchRankingOptionsObjectRanker,
|
|
2482
3853
|
"score_threshold": /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1))
|
|
2483
3854
|
}) {}
|
|
2484
3855
|
exports.RunStepDetailsToolCallsFileSearchRankingOptionsObject = RunStepDetailsToolCallsFileSearchRankingOptionsObject;
|
|
3856
|
+
class RunStepDetailsToolCallsFileSearchResultObjectContentType extends /*#__PURE__*/S.Literal("text") {}
|
|
3857
|
+
exports.RunStepDetailsToolCallsFileSearchResultObjectContentType = RunStepDetailsToolCallsFileSearchResultObjectContentType;
|
|
2485
3858
|
class RunStepDetailsToolCallsFileSearchResultObject extends /*#__PURE__*/S.Struct({
|
|
2486
3859
|
"file_id": S.String,
|
|
2487
3860
|
"file_name": S.String,
|
|
2488
3861
|
"score": /*#__PURE__*/S.Number.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(0), /*#__PURE__*/S.lessThanOrEqualTo(1)),
|
|
2489
3862
|
"content": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array( /*#__PURE__*/S.Struct({
|
|
2490
|
-
"type": /*#__PURE__*/S.optionalWith(
|
|
3863
|
+
"type": /*#__PURE__*/S.optionalWith(RunStepDetailsToolCallsFileSearchResultObjectContentType, {
|
|
2491
3864
|
nullable: true
|
|
2492
3865
|
}),
|
|
2493
3866
|
"text": /*#__PURE__*/S.optionalWith(S.String, {
|
|
@@ -2500,7 +3873,7 @@ class RunStepDetailsToolCallsFileSearchResultObject extends /*#__PURE__*/S.Struc
|
|
|
2500
3873
|
exports.RunStepDetailsToolCallsFileSearchResultObject = RunStepDetailsToolCallsFileSearchResultObject;
|
|
2501
3874
|
class RunStepDetailsToolCallsFileSearchObject extends /*#__PURE__*/S.Struct({
|
|
2502
3875
|
"id": S.String,
|
|
2503
|
-
"type":
|
|
3876
|
+
"type": RunStepDetailsToolCallsFileSearchObjectType,
|
|
2504
3877
|
"file_search": /*#__PURE__*/S.Struct({
|
|
2505
3878
|
"ranking_options": /*#__PURE__*/S.optionalWith(RunStepDetailsToolCallsFileSearchRankingOptionsObject, {
|
|
2506
3879
|
nullable: true
|
|
@@ -2511,9 +3884,11 @@ class RunStepDetailsToolCallsFileSearchObject extends /*#__PURE__*/S.Struct({
|
|
|
2511
3884
|
})
|
|
2512
3885
|
}) {}
|
|
2513
3886
|
exports.RunStepDetailsToolCallsFileSearchObject = RunStepDetailsToolCallsFileSearchObject;
|
|
3887
|
+
class RunStepDetailsToolCallsFunctionObjectType extends /*#__PURE__*/S.Literal("function") {}
|
|
3888
|
+
exports.RunStepDetailsToolCallsFunctionObjectType = RunStepDetailsToolCallsFunctionObjectType;
|
|
2514
3889
|
class RunStepDetailsToolCallsFunctionObject extends /*#__PURE__*/S.Struct({
|
|
2515
3890
|
"id": S.String,
|
|
2516
|
-
"type":
|
|
3891
|
+
"type": RunStepDetailsToolCallsFunctionObjectType,
|
|
2517
3892
|
"function": /*#__PURE__*/S.Struct({
|
|
2518
3893
|
"name": S.String,
|
|
2519
3894
|
"arguments": S.String,
|
|
@@ -2522,10 +3897,12 @@ class RunStepDetailsToolCallsFunctionObject extends /*#__PURE__*/S.Struct({
|
|
|
2522
3897
|
}) {}
|
|
2523
3898
|
exports.RunStepDetailsToolCallsFunctionObject = RunStepDetailsToolCallsFunctionObject;
|
|
2524
3899
|
class RunStepDetailsToolCallsObject extends /*#__PURE__*/S.Struct({
|
|
2525
|
-
"type":
|
|
3900
|
+
"type": RunStepDetailsToolCallsObjectType,
|
|
2526
3901
|
"tool_calls": /*#__PURE__*/S.Array( /*#__PURE__*/S.Union(RunStepDetailsToolCallsCodeObject, RunStepDetailsToolCallsFileSearchObject, RunStepDetailsToolCallsFunctionObject))
|
|
2527
3902
|
}) {}
|
|
2528
3903
|
exports.RunStepDetailsToolCallsObject = RunStepDetailsToolCallsObject;
|
|
3904
|
+
class RunStepObjectLastErrorCode extends /*#__PURE__*/S.Literal("server_error", "rate_limit_exceeded") {}
|
|
3905
|
+
exports.RunStepObjectLastErrorCode = RunStepObjectLastErrorCode;
|
|
2529
3906
|
class RunStepCompletionUsage extends /*#__PURE__*/S.Struct({
|
|
2530
3907
|
"completion_tokens": S.Int,
|
|
2531
3908
|
"prompt_tokens": S.Int,
|
|
@@ -2534,19 +3911,19 @@ class RunStepCompletionUsage extends /*#__PURE__*/S.Struct({
|
|
|
2534
3911
|
exports.RunStepCompletionUsage = RunStepCompletionUsage;
|
|
2535
3912
|
class RunStepObject extends /*#__PURE__*/S.Struct({
|
|
2536
3913
|
"id": S.String,
|
|
2537
|
-
"object":
|
|
3914
|
+
"object": RunStepObjectObject,
|
|
2538
3915
|
"created_at": S.Int,
|
|
2539
3916
|
"assistant_id": S.String,
|
|
2540
3917
|
"thread_id": S.String,
|
|
2541
3918
|
"run_id": S.String,
|
|
2542
|
-
"type":
|
|
2543
|
-
"status":
|
|
3919
|
+
"type": RunStepObjectType,
|
|
3920
|
+
"status": RunStepObjectStatus,
|
|
2544
3921
|
"step_details": /*#__PURE__*/S.Record({
|
|
2545
3922
|
key: S.String,
|
|
2546
3923
|
value: S.Unknown
|
|
2547
3924
|
}),
|
|
2548
3925
|
"last_error": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2549
|
-
"code":
|
|
3926
|
+
"code": RunStepObjectLastErrorCode,
|
|
2550
3927
|
"message": S.String
|
|
2551
3928
|
})),
|
|
2552
3929
|
"expired_at": /*#__PURE__*/S.NullOr(S.Int),
|
|
@@ -2568,8 +3945,10 @@ class ListRunStepsResponse extends /*#__PURE__*/S.Class("ListRunStepsResponse")(
|
|
|
2568
3945
|
"has_more": S.Boolean
|
|
2569
3946
|
}) {}
|
|
2570
3947
|
exports.ListRunStepsResponse = ListRunStepsResponse;
|
|
3948
|
+
class GetRunStepParamsInclude extends /*#__PURE__*/S.Literal("step_details.tool_calls[*].file_search.results[*].content") {}
|
|
3949
|
+
exports.GetRunStepParamsInclude = GetRunStepParamsInclude;
|
|
2571
3950
|
class GetRunStepParams extends /*#__PURE__*/S.Struct({
|
|
2572
|
-
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(
|
|
3951
|
+
"include[]": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Array(GetRunStepParamsInclude), {
|
|
2573
3952
|
nullable: true
|
|
2574
3953
|
})
|
|
2575
3954
|
}) {}
|
|
@@ -2588,22 +3967,28 @@ class SubmitToolOutputsRunRequest extends /*#__PURE__*/S.Class("SubmitToolOutput
|
|
|
2588
3967
|
})
|
|
2589
3968
|
}) {}
|
|
2590
3969
|
exports.SubmitToolOutputsRunRequest = SubmitToolOutputsRunRequest;
|
|
3970
|
+
class CreateUploadRequestPurpose extends /*#__PURE__*/S.Literal("assistants", "batch", "fine-tune", "vision") {}
|
|
3971
|
+
exports.CreateUploadRequestPurpose = CreateUploadRequestPurpose;
|
|
2591
3972
|
class CreateUploadRequest extends /*#__PURE__*/S.Class("CreateUploadRequest")({
|
|
2592
3973
|
"filename": S.String,
|
|
2593
|
-
"purpose":
|
|
3974
|
+
"purpose": CreateUploadRequestPurpose,
|
|
2594
3975
|
"bytes": S.Int,
|
|
2595
3976
|
"mime_type": S.String
|
|
2596
3977
|
}) {}
|
|
2597
3978
|
exports.CreateUploadRequest = CreateUploadRequest;
|
|
3979
|
+
class UploadStatus extends /*#__PURE__*/S.Literal("pending", "completed", "cancelled", "expired") {}
|
|
3980
|
+
exports.UploadStatus = UploadStatus;
|
|
3981
|
+
class UploadObject extends /*#__PURE__*/S.Literal("upload") {}
|
|
3982
|
+
exports.UploadObject = UploadObject;
|
|
2598
3983
|
class Upload extends /*#__PURE__*/S.Class("Upload")({
|
|
2599
3984
|
"id": S.String,
|
|
2600
3985
|
"created_at": S.Int,
|
|
2601
3986
|
"filename": S.String,
|
|
2602
3987
|
"bytes": S.Int,
|
|
2603
3988
|
"purpose": S.String,
|
|
2604
|
-
"status":
|
|
3989
|
+
"status": UploadStatus,
|
|
2605
3990
|
"expires_at": S.Int,
|
|
2606
|
-
"object": /*#__PURE__*/S.optionalWith(
|
|
3991
|
+
"object": /*#__PURE__*/S.optionalWith(UploadObject, {
|
|
2607
3992
|
nullable: true
|
|
2608
3993
|
}),
|
|
2609
3994
|
"file": /*#__PURE__*/S.optionalWith(OpenAIFile, {
|
|
@@ -2618,19 +4003,23 @@ class CompleteUploadRequest extends /*#__PURE__*/S.Class("CompleteUploadRequest"
|
|
|
2618
4003
|
})
|
|
2619
4004
|
}) {}
|
|
2620
4005
|
exports.CompleteUploadRequest = CompleteUploadRequest;
|
|
4006
|
+
class UploadPartObject extends /*#__PURE__*/S.Literal("upload.part") {}
|
|
4007
|
+
exports.UploadPartObject = UploadPartObject;
|
|
2621
4008
|
class UploadPart extends /*#__PURE__*/S.Class("UploadPart")({
|
|
2622
4009
|
"id": S.String,
|
|
2623
4010
|
"created_at": S.Int,
|
|
2624
4011
|
"upload_id": S.String,
|
|
2625
|
-
"object":
|
|
4012
|
+
"object": UploadPartObject
|
|
2626
4013
|
}) {}
|
|
2627
4014
|
exports.UploadPart = UploadPart;
|
|
4015
|
+
class ListVectorStoresParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
4016
|
+
exports.ListVectorStoresParamsOrder = ListVectorStoresParamsOrder;
|
|
2628
4017
|
class ListVectorStoresParams extends /*#__PURE__*/S.Struct({
|
|
2629
4018
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2630
4019
|
nullable: true,
|
|
2631
4020
|
default: () => 20
|
|
2632
4021
|
}),
|
|
2633
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
4022
|
+
"order": /*#__PURE__*/S.optionalWith(ListVectorStoresParamsOrder, {
|
|
2634
4023
|
nullable: true,
|
|
2635
4024
|
default: () => "desc"
|
|
2636
4025
|
}),
|
|
@@ -2642,14 +4031,20 @@ class ListVectorStoresParams extends /*#__PURE__*/S.Struct({
|
|
|
2642
4031
|
})
|
|
2643
4032
|
}) {}
|
|
2644
4033
|
exports.ListVectorStoresParams = ListVectorStoresParams;
|
|
4034
|
+
class VectorStoreObjectObject extends /*#__PURE__*/S.Literal("vector_store") {}
|
|
4035
|
+
exports.VectorStoreObjectObject = VectorStoreObjectObject;
|
|
4036
|
+
class VectorStoreObjectStatus extends /*#__PURE__*/S.Literal("expired", "in_progress", "completed") {}
|
|
4037
|
+
exports.VectorStoreObjectStatus = VectorStoreObjectStatus;
|
|
4038
|
+
class VectorStoreExpirationAfterAnchor extends /*#__PURE__*/S.Literal("last_active_at") {}
|
|
4039
|
+
exports.VectorStoreExpirationAfterAnchor = VectorStoreExpirationAfterAnchor;
|
|
2645
4040
|
class VectorStoreExpirationAfter extends /*#__PURE__*/S.Struct({
|
|
2646
|
-
"anchor":
|
|
4041
|
+
"anchor": VectorStoreExpirationAfterAnchor,
|
|
2647
4042
|
"days": /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(1), /*#__PURE__*/S.lessThanOrEqualTo(365))
|
|
2648
4043
|
}) {}
|
|
2649
4044
|
exports.VectorStoreExpirationAfter = VectorStoreExpirationAfter;
|
|
2650
4045
|
class VectorStoreObject extends /*#__PURE__*/S.Struct({
|
|
2651
4046
|
"id": S.String,
|
|
2652
|
-
"object":
|
|
4047
|
+
"object": VectorStoreObjectObject,
|
|
2653
4048
|
"created_at": S.Int,
|
|
2654
4049
|
"name": S.String,
|
|
2655
4050
|
"usage_bytes": S.Int,
|
|
@@ -2660,7 +4055,7 @@ class VectorStoreObject extends /*#__PURE__*/S.Struct({
|
|
|
2660
4055
|
"cancelled": S.Int,
|
|
2661
4056
|
"total": S.Int
|
|
2662
4057
|
}),
|
|
2663
|
-
"status":
|
|
4058
|
+
"status": VectorStoreObjectStatus,
|
|
2664
4059
|
"expires_after": /*#__PURE__*/S.optionalWith(VectorStoreExpirationAfter, {
|
|
2665
4060
|
nullable: true
|
|
2666
4061
|
}),
|
|
@@ -2682,17 +4077,21 @@ class ListVectorStoresResponse extends /*#__PURE__*/S.Class("ListVectorStoresRes
|
|
|
2682
4077
|
"has_more": S.Boolean
|
|
2683
4078
|
}) {}
|
|
2684
4079
|
exports.ListVectorStoresResponse = ListVectorStoresResponse;
|
|
4080
|
+
class AutoChunkingStrategyRequestParamType extends /*#__PURE__*/S.Literal("auto") {}
|
|
4081
|
+
exports.AutoChunkingStrategyRequestParamType = AutoChunkingStrategyRequestParamType;
|
|
2685
4082
|
class AutoChunkingStrategyRequestParam extends /*#__PURE__*/S.Struct({
|
|
2686
|
-
"type":
|
|
4083
|
+
"type": AutoChunkingStrategyRequestParamType
|
|
2687
4084
|
}) {}
|
|
2688
4085
|
exports.AutoChunkingStrategyRequestParam = AutoChunkingStrategyRequestParam;
|
|
4086
|
+
class StaticChunkingStrategyRequestParamType extends /*#__PURE__*/S.Literal("static") {}
|
|
4087
|
+
exports.StaticChunkingStrategyRequestParamType = StaticChunkingStrategyRequestParamType;
|
|
2689
4088
|
class StaticChunkingStrategy extends /*#__PURE__*/S.Struct({
|
|
2690
4089
|
"max_chunk_size_tokens": /*#__PURE__*/S.Int.pipe( /*#__PURE__*/S.greaterThanOrEqualTo(100), /*#__PURE__*/S.lessThanOrEqualTo(4096)),
|
|
2691
4090
|
"chunk_overlap_tokens": S.Int
|
|
2692
4091
|
}) {}
|
|
2693
4092
|
exports.StaticChunkingStrategy = StaticChunkingStrategy;
|
|
2694
4093
|
class StaticChunkingStrategyRequestParam extends /*#__PURE__*/S.Struct({
|
|
2695
|
-
"type":
|
|
4094
|
+
"type": StaticChunkingStrategyRequestParamType,
|
|
2696
4095
|
"static": StaticChunkingStrategy
|
|
2697
4096
|
}) {}
|
|
2698
4097
|
exports.StaticChunkingStrategyRequestParam = StaticChunkingStrategyRequestParam;
|
|
@@ -2735,10 +4134,12 @@ class UpdateVectorStoreRequest extends /*#__PURE__*/S.Class("UpdateVectorStoreRe
|
|
|
2735
4134
|
})
|
|
2736
4135
|
}) {}
|
|
2737
4136
|
exports.UpdateVectorStoreRequest = UpdateVectorStoreRequest;
|
|
4137
|
+
class DeleteVectorStoreResponseObject extends /*#__PURE__*/S.Literal("vector_store.deleted") {}
|
|
4138
|
+
exports.DeleteVectorStoreResponseObject = DeleteVectorStoreResponseObject;
|
|
2738
4139
|
class DeleteVectorStoreResponse extends /*#__PURE__*/S.Class("DeleteVectorStoreResponse")({
|
|
2739
4140
|
"id": S.String,
|
|
2740
4141
|
"deleted": S.Boolean,
|
|
2741
|
-
"object":
|
|
4142
|
+
"object": DeleteVectorStoreResponseObject
|
|
2742
4143
|
}) {}
|
|
2743
4144
|
exports.DeleteVectorStoreResponse = DeleteVectorStoreResponse;
|
|
2744
4145
|
class ChunkingStrategyRequestParam extends /*#__PURE__*/S.Record({
|
|
@@ -2753,12 +4154,16 @@ class CreateVectorStoreFileBatchRequest extends /*#__PURE__*/S.Class("CreateVect
|
|
|
2753
4154
|
})
|
|
2754
4155
|
}) {}
|
|
2755
4156
|
exports.CreateVectorStoreFileBatchRequest = CreateVectorStoreFileBatchRequest;
|
|
4157
|
+
class VectorStoreFileBatchObjectObject extends /*#__PURE__*/S.Literal("vector_store.files_batch") {}
|
|
4158
|
+
exports.VectorStoreFileBatchObjectObject = VectorStoreFileBatchObjectObject;
|
|
4159
|
+
class VectorStoreFileBatchObjectStatus extends /*#__PURE__*/S.Literal("in_progress", "completed", "cancelled", "failed") {}
|
|
4160
|
+
exports.VectorStoreFileBatchObjectStatus = VectorStoreFileBatchObjectStatus;
|
|
2756
4161
|
class VectorStoreFileBatchObject extends /*#__PURE__*/S.Class("VectorStoreFileBatchObject")({
|
|
2757
4162
|
"id": S.String,
|
|
2758
|
-
"object":
|
|
4163
|
+
"object": VectorStoreFileBatchObjectObject,
|
|
2759
4164
|
"created_at": S.Int,
|
|
2760
4165
|
"vector_store_id": S.String,
|
|
2761
|
-
"status":
|
|
4166
|
+
"status": VectorStoreFileBatchObjectStatus,
|
|
2762
4167
|
"file_counts": /*#__PURE__*/S.Struct({
|
|
2763
4168
|
"in_progress": S.Int,
|
|
2764
4169
|
"completed": S.Int,
|
|
@@ -2768,12 +4173,16 @@ class VectorStoreFileBatchObject extends /*#__PURE__*/S.Class("VectorStoreFileBa
|
|
|
2768
4173
|
})
|
|
2769
4174
|
}) {}
|
|
2770
4175
|
exports.VectorStoreFileBatchObject = VectorStoreFileBatchObject;
|
|
4176
|
+
class ListFilesInVectorStoreBatchParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
4177
|
+
exports.ListFilesInVectorStoreBatchParamsOrder = ListFilesInVectorStoreBatchParamsOrder;
|
|
4178
|
+
class ListFilesInVectorStoreBatchParamsFilter extends /*#__PURE__*/S.Literal("in_progress", "completed", "failed", "cancelled") {}
|
|
4179
|
+
exports.ListFilesInVectorStoreBatchParamsFilter = ListFilesInVectorStoreBatchParamsFilter;
|
|
2771
4180
|
class ListFilesInVectorStoreBatchParams extends /*#__PURE__*/S.Struct({
|
|
2772
4181
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2773
4182
|
nullable: true,
|
|
2774
4183
|
default: () => 20
|
|
2775
4184
|
}),
|
|
2776
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
4185
|
+
"order": /*#__PURE__*/S.optionalWith(ListFilesInVectorStoreBatchParamsOrder, {
|
|
2777
4186
|
nullable: true,
|
|
2778
4187
|
default: () => "desc"
|
|
2779
4188
|
}),
|
|
@@ -2783,29 +4192,39 @@ class ListFilesInVectorStoreBatchParams extends /*#__PURE__*/S.Struct({
|
|
|
2783
4192
|
"before": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2784
4193
|
nullable: true
|
|
2785
4194
|
}),
|
|
2786
|
-
"filter": /*#__PURE__*/S.optionalWith(
|
|
4195
|
+
"filter": /*#__PURE__*/S.optionalWith(ListFilesInVectorStoreBatchParamsFilter, {
|
|
2787
4196
|
nullable: true
|
|
2788
4197
|
})
|
|
2789
4198
|
}) {}
|
|
2790
4199
|
exports.ListFilesInVectorStoreBatchParams = ListFilesInVectorStoreBatchParams;
|
|
4200
|
+
class VectorStoreFileObjectObject extends /*#__PURE__*/S.Literal("vector_store.file") {}
|
|
4201
|
+
exports.VectorStoreFileObjectObject = VectorStoreFileObjectObject;
|
|
4202
|
+
class VectorStoreFileObjectStatus extends /*#__PURE__*/S.Literal("in_progress", "completed", "cancelled", "failed") {}
|
|
4203
|
+
exports.VectorStoreFileObjectStatus = VectorStoreFileObjectStatus;
|
|
4204
|
+
class VectorStoreFileObjectLastErrorCode extends /*#__PURE__*/S.Literal("server_error", "unsupported_file", "invalid_file") {}
|
|
4205
|
+
exports.VectorStoreFileObjectLastErrorCode = VectorStoreFileObjectLastErrorCode;
|
|
4206
|
+
class StaticChunkingStrategyResponseParamType extends /*#__PURE__*/S.Literal("static") {}
|
|
4207
|
+
exports.StaticChunkingStrategyResponseParamType = StaticChunkingStrategyResponseParamType;
|
|
2791
4208
|
class StaticChunkingStrategyResponseParam extends /*#__PURE__*/S.Struct({
|
|
2792
|
-
"type":
|
|
4209
|
+
"type": StaticChunkingStrategyResponseParamType,
|
|
2793
4210
|
"static": StaticChunkingStrategy
|
|
2794
4211
|
}) {}
|
|
2795
4212
|
exports.StaticChunkingStrategyResponseParam = StaticChunkingStrategyResponseParam;
|
|
4213
|
+
class OtherChunkingStrategyResponseParamType extends /*#__PURE__*/S.Literal("other") {}
|
|
4214
|
+
exports.OtherChunkingStrategyResponseParamType = OtherChunkingStrategyResponseParamType;
|
|
2796
4215
|
class OtherChunkingStrategyResponseParam extends /*#__PURE__*/S.Struct({
|
|
2797
|
-
"type":
|
|
4216
|
+
"type": OtherChunkingStrategyResponseParamType
|
|
2798
4217
|
}) {}
|
|
2799
4218
|
exports.OtherChunkingStrategyResponseParam = OtherChunkingStrategyResponseParam;
|
|
2800
4219
|
class VectorStoreFileObject extends /*#__PURE__*/S.Struct({
|
|
2801
4220
|
"id": S.String,
|
|
2802
|
-
"object":
|
|
4221
|
+
"object": VectorStoreFileObjectObject,
|
|
2803
4222
|
"usage_bytes": S.Int,
|
|
2804
4223
|
"created_at": S.Int,
|
|
2805
4224
|
"vector_store_id": S.String,
|
|
2806
|
-
"status":
|
|
4225
|
+
"status": VectorStoreFileObjectStatus,
|
|
2807
4226
|
"last_error": /*#__PURE__*/S.NullOr( /*#__PURE__*/S.Struct({
|
|
2808
|
-
"code":
|
|
4227
|
+
"code": VectorStoreFileObjectLastErrorCode,
|
|
2809
4228
|
"message": S.String
|
|
2810
4229
|
})),
|
|
2811
4230
|
"chunking_strategy": /*#__PURE__*/S.optionalWith( /*#__PURE__*/S.Record({
|
|
@@ -2824,12 +4243,16 @@ class ListVectorStoreFilesResponse extends /*#__PURE__*/S.Class("ListVectorStore
|
|
|
2824
4243
|
"has_more": S.Boolean
|
|
2825
4244
|
}) {}
|
|
2826
4245
|
exports.ListVectorStoreFilesResponse = ListVectorStoreFilesResponse;
|
|
4246
|
+
class ListVectorStoreFilesParamsOrder extends /*#__PURE__*/S.Literal("asc", "desc") {}
|
|
4247
|
+
exports.ListVectorStoreFilesParamsOrder = ListVectorStoreFilesParamsOrder;
|
|
4248
|
+
class ListVectorStoreFilesParamsFilter extends /*#__PURE__*/S.Literal("in_progress", "completed", "failed", "cancelled") {}
|
|
4249
|
+
exports.ListVectorStoreFilesParamsFilter = ListVectorStoreFilesParamsFilter;
|
|
2827
4250
|
class ListVectorStoreFilesParams extends /*#__PURE__*/S.Struct({
|
|
2828
4251
|
"limit": /*#__PURE__*/S.optionalWith(S.Int, {
|
|
2829
4252
|
nullable: true,
|
|
2830
4253
|
default: () => 20
|
|
2831
4254
|
}),
|
|
2832
|
-
"order": /*#__PURE__*/S.optionalWith(
|
|
4255
|
+
"order": /*#__PURE__*/S.optionalWith(ListVectorStoreFilesParamsOrder, {
|
|
2833
4256
|
nullable: true,
|
|
2834
4257
|
default: () => "desc"
|
|
2835
4258
|
}),
|
|
@@ -2839,7 +4262,7 @@ class ListVectorStoreFilesParams extends /*#__PURE__*/S.Struct({
|
|
|
2839
4262
|
"before": /*#__PURE__*/S.optionalWith(S.String, {
|
|
2840
4263
|
nullable: true
|
|
2841
4264
|
}),
|
|
2842
|
-
"filter": /*#__PURE__*/S.optionalWith(
|
|
4265
|
+
"filter": /*#__PURE__*/S.optionalWith(ListVectorStoreFilesParamsFilter, {
|
|
2843
4266
|
nullable: true
|
|
2844
4267
|
})
|
|
2845
4268
|
}) {}
|
|
@@ -2851,10 +4274,12 @@ class CreateVectorStoreFileRequest extends /*#__PURE__*/S.Class("CreateVectorSto
|
|
|
2851
4274
|
})
|
|
2852
4275
|
}) {}
|
|
2853
4276
|
exports.CreateVectorStoreFileRequest = CreateVectorStoreFileRequest;
|
|
4277
|
+
class DeleteVectorStoreFileResponseObject extends /*#__PURE__*/S.Literal("vector_store.file.deleted") {}
|
|
4278
|
+
exports.DeleteVectorStoreFileResponseObject = DeleteVectorStoreFileResponseObject;
|
|
2854
4279
|
class DeleteVectorStoreFileResponse extends /*#__PURE__*/S.Class("DeleteVectorStoreFileResponse")({
|
|
2855
4280
|
"id": S.String,
|
|
2856
4281
|
"deleted": S.Boolean,
|
|
2857
|
-
"object":
|
|
4282
|
+
"object": DeleteVectorStoreFileResponseObject
|
|
2858
4283
|
}) {}
|
|
2859
4284
|
exports.DeleteVectorStoreFileResponse = DeleteVectorStoreFileResponse;
|
|
2860
4285
|
const make = httpClient => {
|
|
@@ -2934,7 +4359,10 @@ const make = httpClient => {
|
|
|
2934
4359
|
orElse: response => unexpectedStatus(request, response)
|
|
2935
4360
|
}))), Effect.scoped),
|
|
2936
4361
|
"listFiles": options => HttpClientRequest.make("GET")(`/files`).pipe(HttpClientRequest.setUrlParams({
|
|
2937
|
-
"purpose": options["purpose"]
|
|
4362
|
+
"purpose": options["purpose"],
|
|
4363
|
+
"limit": options["limit"],
|
|
4364
|
+
"order": options["order"],
|
|
4365
|
+
"after": options["after"]
|
|
2938
4366
|
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
2939
4367
|
"200": r => HttpClientResponse.schemaBodyJson(ListFilesResponse)(r),
|
|
2940
4368
|
orElse: response => unexpectedStatus(request, response)
|
|
@@ -3016,6 +4444,26 @@ const make = httpClient => {
|
|
|
3016
4444
|
"200": r => HttpClientResponse.schemaBodyJson(CreateModerationResponse)(r),
|
|
3017
4445
|
orElse: response => unexpectedStatus(request, response)
|
|
3018
4446
|
}))), Effect.scoped),
|
|
4447
|
+
"adminApiKeysList": options => HttpClientRequest.make("GET")(`/organization/admin_api_keys`).pipe(HttpClientRequest.setUrlParams({
|
|
4448
|
+
"after": options["after"],
|
|
4449
|
+
"order": options["order"],
|
|
4450
|
+
"limit": options["limit"]
|
|
4451
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4452
|
+
"200": r => HttpClientResponse.schemaBodyJson(ApiKeyList)(r),
|
|
4453
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4454
|
+
}))), Effect.scoped),
|
|
4455
|
+
"adminApiKeysCreate": options => HttpClientRequest.make("POST")(`/organization/admin_api_keys`).pipe(req => Effect.orDie(HttpClientRequest.bodyJson(req, options)), Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4456
|
+
"200": r => HttpClientResponse.schemaBodyJson(AdminApiKey)(r),
|
|
4457
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4458
|
+
}))), Effect.scoped),
|
|
4459
|
+
"adminApiKeysGet": keyId => HttpClientRequest.make("GET")(`/organization/admin_api_keys/${keyId}`).pipe(Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4460
|
+
"200": r => HttpClientResponse.schemaBodyJson(AdminApiKey)(r),
|
|
4461
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4462
|
+
}))), Effect.scoped),
|
|
4463
|
+
"adminApiKeysDelete": keyId => HttpClientRequest.make("DELETE")(`/organization/admin_api_keys/${keyId}`).pipe(Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4464
|
+
"200": r => HttpClientResponse.schemaBodyJson(AdminApiKeysDelete200)(r),
|
|
4465
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4466
|
+
}))), Effect.scoped),
|
|
3019
4467
|
"listAuditLogs": options => HttpClientRequest.make("GET")(`/organization/audit_logs`).pipe(HttpClientRequest.setUrlParams({
|
|
3020
4468
|
"effective_at[gt]": options["effective_at[gt]"],
|
|
3021
4469
|
"effective_at[gte]": options["effective_at[gte]"],
|
|
@@ -3033,6 +4481,18 @@ const make = httpClient => {
|
|
|
3033
4481
|
"200": r => HttpClientResponse.schemaBodyJson(ListAuditLogsResponse)(r),
|
|
3034
4482
|
orElse: response => unexpectedStatus(request, response)
|
|
3035
4483
|
}))), Effect.scoped),
|
|
4484
|
+
"usageCosts": options => HttpClientRequest.make("GET")(`/organization/costs`).pipe(HttpClientRequest.setUrlParams({
|
|
4485
|
+
"start_time": options["start_time"],
|
|
4486
|
+
"end_time": options["end_time"],
|
|
4487
|
+
"bucket_width": options["bucket_width"],
|
|
4488
|
+
"project_ids": options["project_ids"],
|
|
4489
|
+
"group_by": options["group_by"],
|
|
4490
|
+
"limit": options["limit"],
|
|
4491
|
+
"page": options["page"]
|
|
4492
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4493
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4494
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4495
|
+
}))), Effect.scoped),
|
|
3036
4496
|
"listInvites": options => HttpClientRequest.make("GET")(`/organization/invites`).pipe(HttpClientRequest.setUrlParams({
|
|
3037
4497
|
"limit": options["limit"],
|
|
3038
4498
|
"after": options["after"]
|
|
@@ -3093,6 +4553,19 @@ const make = httpClient => {
|
|
|
3093
4553
|
"200": r => HttpClientResponse.schemaBodyJson(Project)(r),
|
|
3094
4554
|
orElse: response => unexpectedStatus(request, response)
|
|
3095
4555
|
}))), Effect.scoped),
|
|
4556
|
+
"listProjectRateLimits": (projectId, options) => HttpClientRequest.make("GET")(`/organization/projects/${projectId}/rate_limits`).pipe(HttpClientRequest.setUrlParams({
|
|
4557
|
+
"limit": options["limit"],
|
|
4558
|
+
"after": options["after"],
|
|
4559
|
+
"before": options["before"]
|
|
4560
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4561
|
+
"200": r => HttpClientResponse.schemaBodyJson(ProjectRateLimitListResponse)(r),
|
|
4562
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4563
|
+
}))), Effect.scoped),
|
|
4564
|
+
"updateProjectRateLimits": (projectId, rateLimitId, options) => HttpClientRequest.make("POST")(`/organization/projects/${projectId}/rate_limits/${rateLimitId}`).pipe(req => Effect.orDie(HttpClientRequest.bodyJson(req, options)), Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4565
|
+
"200": r => HttpClientResponse.schemaBodyJson(ProjectRateLimit)(r),
|
|
4566
|
+
"400": r => decodeError(r, ErrorResponse),
|
|
4567
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4568
|
+
}))), Effect.scoped),
|
|
3096
4569
|
"listProjectServiceAccounts": (projectId, options) => HttpClientRequest.make("GET")(`/organization/projects/${projectId}/service_accounts`).pipe(HttpClientRequest.setUrlParams({
|
|
3097
4570
|
"limit": options["limit"],
|
|
3098
4571
|
"after": options["after"]
|
|
@@ -3141,6 +4614,123 @@ const make = httpClient => {
|
|
|
3141
4614
|
"400": r => decodeError(r, ErrorResponse),
|
|
3142
4615
|
orElse: response => unexpectedStatus(request, response)
|
|
3143
4616
|
}))), Effect.scoped),
|
|
4617
|
+
"usageAudioSpeeches": options => HttpClientRequest.make("GET")(`/organization/usage/audio_speeches`).pipe(HttpClientRequest.setUrlParams({
|
|
4618
|
+
"start_time": options["start_time"],
|
|
4619
|
+
"end_time": options["end_time"],
|
|
4620
|
+
"bucket_width": options["bucket_width"],
|
|
4621
|
+
"project_ids": options["project_ids"],
|
|
4622
|
+
"user_ids": options["user_ids"],
|
|
4623
|
+
"api_key_ids": options["api_key_ids"],
|
|
4624
|
+
"models": options["models"],
|
|
4625
|
+
"group_by": options["group_by"],
|
|
4626
|
+
"limit": options["limit"],
|
|
4627
|
+
"page": options["page"]
|
|
4628
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4629
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4630
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4631
|
+
}))), Effect.scoped),
|
|
4632
|
+
"usageAudioTranscriptions": options => HttpClientRequest.make("GET")(`/organization/usage/audio_transcriptions`).pipe(HttpClientRequest.setUrlParams({
|
|
4633
|
+
"start_time": options["start_time"],
|
|
4634
|
+
"end_time": options["end_time"],
|
|
4635
|
+
"bucket_width": options["bucket_width"],
|
|
4636
|
+
"project_ids": options["project_ids"],
|
|
4637
|
+
"user_ids": options["user_ids"],
|
|
4638
|
+
"api_key_ids": options["api_key_ids"],
|
|
4639
|
+
"models": options["models"],
|
|
4640
|
+
"group_by": options["group_by"],
|
|
4641
|
+
"limit": options["limit"],
|
|
4642
|
+
"page": options["page"]
|
|
4643
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4644
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4645
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4646
|
+
}))), Effect.scoped),
|
|
4647
|
+
"usageCodeInterpreterSessions": options => HttpClientRequest.make("GET")(`/organization/usage/code_interpreter_sessions`).pipe(HttpClientRequest.setUrlParams({
|
|
4648
|
+
"start_time": options["start_time"],
|
|
4649
|
+
"end_time": options["end_time"],
|
|
4650
|
+
"bucket_width": options["bucket_width"],
|
|
4651
|
+
"project_ids": options["project_ids"],
|
|
4652
|
+
"group_by": options["group_by"],
|
|
4653
|
+
"limit": options["limit"],
|
|
4654
|
+
"page": options["page"]
|
|
4655
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4656
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4657
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4658
|
+
}))), Effect.scoped),
|
|
4659
|
+
"usageCompletions": options => HttpClientRequest.make("GET")(`/organization/usage/completions`).pipe(HttpClientRequest.setUrlParams({
|
|
4660
|
+
"start_time": options["start_time"],
|
|
4661
|
+
"end_time": options["end_time"],
|
|
4662
|
+
"bucket_width": options["bucket_width"],
|
|
4663
|
+
"project_ids": options["project_ids"],
|
|
4664
|
+
"user_ids": options["user_ids"],
|
|
4665
|
+
"api_key_ids": options["api_key_ids"],
|
|
4666
|
+
"models": options["models"],
|
|
4667
|
+
"batch": options["batch"],
|
|
4668
|
+
"group_by": options["group_by"],
|
|
4669
|
+
"limit": options["limit"],
|
|
4670
|
+
"page": options["page"]
|
|
4671
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4672
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4673
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4674
|
+
}))), Effect.scoped),
|
|
4675
|
+
"usageEmbeddings": options => HttpClientRequest.make("GET")(`/organization/usage/embeddings`).pipe(HttpClientRequest.setUrlParams({
|
|
4676
|
+
"start_time": options["start_time"],
|
|
4677
|
+
"end_time": options["end_time"],
|
|
4678
|
+
"bucket_width": options["bucket_width"],
|
|
4679
|
+
"project_ids": options["project_ids"],
|
|
4680
|
+
"user_ids": options["user_ids"],
|
|
4681
|
+
"api_key_ids": options["api_key_ids"],
|
|
4682
|
+
"models": options["models"],
|
|
4683
|
+
"group_by": options["group_by"],
|
|
4684
|
+
"limit": options["limit"],
|
|
4685
|
+
"page": options["page"]
|
|
4686
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4687
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4688
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4689
|
+
}))), Effect.scoped),
|
|
4690
|
+
"usageImages": options => HttpClientRequest.make("GET")(`/organization/usage/images`).pipe(HttpClientRequest.setUrlParams({
|
|
4691
|
+
"start_time": options["start_time"],
|
|
4692
|
+
"end_time": options["end_time"],
|
|
4693
|
+
"bucket_width": options["bucket_width"],
|
|
4694
|
+
"sources": options["sources"],
|
|
4695
|
+
"sizes": options["sizes"],
|
|
4696
|
+
"project_ids": options["project_ids"],
|
|
4697
|
+
"user_ids": options["user_ids"],
|
|
4698
|
+
"api_key_ids": options["api_key_ids"],
|
|
4699
|
+
"models": options["models"],
|
|
4700
|
+
"group_by": options["group_by"],
|
|
4701
|
+
"limit": options["limit"],
|
|
4702
|
+
"page": options["page"]
|
|
4703
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4704
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4705
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4706
|
+
}))), Effect.scoped),
|
|
4707
|
+
"usageModerations": options => HttpClientRequest.make("GET")(`/organization/usage/moderations`).pipe(HttpClientRequest.setUrlParams({
|
|
4708
|
+
"start_time": options["start_time"],
|
|
4709
|
+
"end_time": options["end_time"],
|
|
4710
|
+
"bucket_width": options["bucket_width"],
|
|
4711
|
+
"project_ids": options["project_ids"],
|
|
4712
|
+
"user_ids": options["user_ids"],
|
|
4713
|
+
"api_key_ids": options["api_key_ids"],
|
|
4714
|
+
"models": options["models"],
|
|
4715
|
+
"group_by": options["group_by"],
|
|
4716
|
+
"limit": options["limit"],
|
|
4717
|
+
"page": options["page"]
|
|
4718
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4719
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4720
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4721
|
+
}))), Effect.scoped),
|
|
4722
|
+
"usageVectorStores": options => HttpClientRequest.make("GET")(`/organization/usage/vector_stores`).pipe(HttpClientRequest.setUrlParams({
|
|
4723
|
+
"start_time": options["start_time"],
|
|
4724
|
+
"end_time": options["end_time"],
|
|
4725
|
+
"bucket_width": options["bucket_width"],
|
|
4726
|
+
"project_ids": options["project_ids"],
|
|
4727
|
+
"group_by": options["group_by"],
|
|
4728
|
+
"limit": options["limit"],
|
|
4729
|
+
"page": options["page"]
|
|
4730
|
+
}), Effect.succeed, Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4731
|
+
"200": r => HttpClientResponse.schemaBodyJson(UsageResponse)(r),
|
|
4732
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4733
|
+
}))), Effect.scoped),
|
|
3144
4734
|
"listUsers": options => HttpClientRequest.make("GET")(`/organization/users`).pipe(HttpClientRequest.setUrlParams({
|
|
3145
4735
|
"limit": options["limit"],
|
|
3146
4736
|
"after": options["after"]
|
|
@@ -3160,6 +4750,10 @@ const make = httpClient => {
|
|
|
3160
4750
|
"200": r => HttpClientResponse.schemaBodyJson(UserDeleteResponse)(r),
|
|
3161
4751
|
orElse: response => unexpectedStatus(request, response)
|
|
3162
4752
|
}))), Effect.scoped),
|
|
4753
|
+
"createRealtimeSession": options => HttpClientRequest.make("POST")(`/realtime/sessions`).pipe(req => Effect.orDie(HttpClientRequest.bodyJson(req, options)), Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
4754
|
+
"200": r => HttpClientResponse.schemaBodyJson(RealtimeSessionCreateResponse)(r),
|
|
4755
|
+
orElse: response => unexpectedStatus(request, response)
|
|
4756
|
+
}))), Effect.scoped),
|
|
3163
4757
|
"createThread": options => HttpClientRequest.make("POST")(`/threads`).pipe(req => Effect.orDie(HttpClientRequest.bodyJson(req, options)), Effect.flatMap(request => Effect.flatMap(httpClient.execute(request), HttpClientResponse.matchStatus({
|
|
3164
4758
|
"200": r => HttpClientResponse.schemaBodyJson(ThreadObject)(r),
|
|
3165
4759
|
orElse: response => unexpectedStatus(request, response)
|