From ab69e07142b7d1d6ed81a206aa7b48b80b870f90 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 4 Dec 2024 21:14:56 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- .../JsonConverters.CostsResultObject.g.cs | 49 + ...nConverters.CostsResultObjectNullable.g.cs | 56 + ...ClientEventConversationItemCreateType.g.cs | 49 + ...entConversationItemCreateTypeNullable.g.cs | 56 + ...ClientEventConversationItemDeleteType.g.cs | 49 + ...entConversationItemDeleteTypeNullable.g.cs | 56 + ...ientEventConversationItemTruncateType.g.cs | 49 + ...tConversationItemTruncateTypeNullable.g.cs | 56 + ...ClientEventInputAudioBufferAppendType.g.cs | 49 + ...entInputAudioBufferAppendTypeNullable.g.cs | 56 + ...eClientEventInputAudioBufferClearType.g.cs | 49 + ...ventInputAudioBufferClearTypeNullable.g.cs | 56 + ...ClientEventInputAudioBufferCommitType.g.cs | 49 + ...entInputAudioBufferCommitTypeNullable.g.cs | 56 + ...RealtimeClientEventResponseCancelType.g.cs | 49 + ...ClientEventResponseCancelTypeNullable.g.cs | 56 + ...RealtimeClientEventResponseCreateType.g.cs | 49 + ...ClientEventResponseCreateTypeNullable.g.cs | 56 + ....RealtimeClientEventSessionUpdateType.g.cs | 49 + ...eClientEventSessionUpdateTypeNullable.g.cs | 56 + ...imeServerEventConversationCreatedType.g.cs | 49 + ...rEventConversationCreatedTypeNullable.g.cs | 56 + ...erverEventConversationItemCreatedType.g.cs | 49 + ...ntConversationItemCreatedTypeNullable.g.cs | 56 + ...erverEventConversationItemDeletedType.g.cs | 49 + ...ntConversationItemDeletedTypeNullable.g.cs | 56 + ...mInputAudioTranscriptionCompletedType.g.cs | 49 + ...dioTranscriptionCompletedTypeNullable.g.cs | 56 + ...ItemInputAudioTranscriptionFailedType.g.cs | 49 + ...tAudioTranscriptionFailedTypeNullable.g.cs | 56 + ...verEventConversationItemTruncatedType.g.cs | 49 + ...ConversationItemTruncatedTypeNullable.g.cs | 56 + ...nverters.RealtimeServerEventErrorType.g.cs | 49 + ....RealtimeServerEventErrorTypeNullable.g.cs | 56 + ...erverEventInputAudioBufferClearedType.g.cs | 49 + ...ntInputAudioBufferClearedTypeNullable.g.cs | 56 + ...verEventInputAudioBufferCommittedType.g.cs | 49 + ...InputAudioBufferCommittedTypeNullable.g.cs | 56 + ...ventInputAudioBufferSpeechStartedType.g.cs | 49 + ...tAudioBufferSpeechStartedTypeNullable.g.cs | 56 + ...ventInputAudioBufferSpeechStoppedType.g.cs | 49 + ...tAudioBufferSpeechStoppedTypeNullable.g.cs | 56 + ...ltimeServerEventRateLimitsUpdatedType.g.cs | 49 + ...verEventRateLimitsUpdatedTypeNullable.g.cs | 56 + ...timeServerEventResponseAudioDeltaType.g.cs | 49 + ...erEventResponseAudioDeltaTypeNullable.g.cs | 56 + ...ltimeServerEventResponseAudioDoneType.g.cs | 49 + ...verEventResponseAudioDoneTypeNullable.g.cs | 56 + ...EventResponseAudioTranscriptDeltaType.g.cs | 49 + ...ponseAudioTranscriptDeltaTypeNullable.g.cs | 56 + ...rEventResponseAudioTranscriptDoneType.g.cs | 49 + ...sponseAudioTranscriptDoneTypeNullable.g.cs | 56 + ...EventResponseContentPartAddedPartType.g.cs | 49 + ...ponseContentPartAddedPartTypeNullable.g.cs | 56 + ...rverEventResponseContentPartAddedType.g.cs | 49 + ...tResponseContentPartAddedTypeNullable.g.cs | 56 + ...erverEventResponseContentPartDoneType.g.cs | 49 + ...ntResponseContentPartDoneTypeNullable.g.cs | 56 + ...ealtimeServerEventResponseCreatedType.g.cs | 49 + ...erverEventResponseCreatedTypeNullable.g.cs | 56 + ...s.RealtimeServerEventResponseDoneType.g.cs | 49 + ...meServerEventResponseDoneTypeNullable.g.cs | 56 + ...esponseFunctionCallArgumentsDeltaType.g.cs | 49 + ...unctionCallArgumentsDeltaTypeNullable.g.cs | 56 + ...ResponseFunctionCallArgumentsDoneType.g.cs | 49 + ...FunctionCallArgumentsDoneTypeNullable.g.cs | 56 + ...erverEventResponseOutputItemAddedType.g.cs | 49 + ...ntResponseOutputItemAddedTypeNullable.g.cs | 56 + ...ServerEventResponseOutputItemDoneType.g.cs | 49 + ...entResponseOutputItemDoneTypeNullable.g.cs | 56 + ...ltimeServerEventResponseTextDeltaType.g.cs | 49 + ...verEventResponseTextDeltaTypeNullable.g.cs | 56 + ...altimeServerEventResponseTextDoneType.g.cs | 49 + ...rverEventResponseTextDoneTypeNullable.g.cs | 56 + ...RealtimeServerEventSessionCreatedType.g.cs | 49 + ...ServerEventSessionCreatedTypeNullable.g.cs | 56 + ...RealtimeServerEventSessionUpdatedType.g.cs | 49 + ...ServerEventSessionUpdatedTypeNullable.g.cs | 56 + .../Generated/JsonConverters.ResultItem.g.cs | 169 ++ ...verters.UsageAudioSpeechesBucketWidth.g.cs | 49 + ...UsageAudioSpeechesBucketWidthNullable.g.cs | 56 + ...verters.UsageAudioSpeechesGroupByItem.g.cs | 49 + ...UsageAudioSpeechesGroupByItemNullable.g.cs | 56 + ...erters.UsageAudioSpeechesResultObject.g.cs | 49 + ...sageAudioSpeechesResultObjectNullable.g.cs | 56 + ...s.UsageAudioTranscriptionsBucketWidth.g.cs | 49 + ...udioTranscriptionsBucketWidthNullable.g.cs | 56 + ...s.UsageAudioTranscriptionsGroupByItem.g.cs | 49 + ...udioTranscriptionsGroupByItemNullable.g.cs | 56 + ....UsageAudioTranscriptionsResultObject.g.cs | 49 + ...dioTranscriptionsResultObjectNullable.g.cs | 56 + ...ageCodeInterpreterSessionsBucketWidth.g.cs | 49 + ...nterpreterSessionsBucketWidthNullable.g.cs | 56 + ...ageCodeInterpreterSessionsGroupByItem.g.cs | 49 + ...nterpreterSessionsGroupByItemNullable.g.cs | 56 + ...geCodeInterpreterSessionsResultObject.g.cs | 49 + ...terpreterSessionsResultObjectNullable.g.cs | 56 + ...onverters.UsageCompletionsBucketWidth.g.cs | 49 + ...s.UsageCompletionsBucketWidthNullable.g.cs | 56 + ...onverters.UsageCompletionsGroupByItem.g.cs | 49 + ...s.UsageCompletionsGroupByItemNullable.g.cs | 56 + ...nverters.UsageCompletionsResultObject.g.cs | 49 + ....UsageCompletionsResultObjectNullable.g.cs | 56 + .../JsonConverters.UsageCostsBucketWidth.g.cs | 49 + ...verters.UsageCostsBucketWidthNullable.g.cs | 56 + .../JsonConverters.UsageCostsGroupByItem.g.cs | 49 + ...verters.UsageCostsGroupByItemNullable.g.cs | 56 + ...Converters.UsageEmbeddingsBucketWidth.g.cs | 49 + ...rs.UsageEmbeddingsBucketWidthNullable.g.cs | 56 + ...Converters.UsageEmbeddingsGroupByItem.g.cs | 49 + ...rs.UsageEmbeddingsGroupByItemNullable.g.cs | 56 + ...onverters.UsageEmbeddingsResultObject.g.cs | 49 + ...s.UsageEmbeddingsResultObjectNullable.g.cs | 56 + ...JsonConverters.UsageImagesBucketWidth.g.cs | 49 + ...erters.UsageImagesBucketWidthNullable.g.cs | 56 + ...JsonConverters.UsageImagesGroupByItem.g.cs | 49 + ...erters.UsageImagesGroupByItemNullable.g.cs | 56 + ...sonConverters.UsageImagesResultObject.g.cs | 49 + ...rters.UsageImagesResultObjectNullable.g.cs | 56 + .../JsonConverters.UsageImagesSize.g.cs | 49 + ...sonConverters.UsageImagesSizeNullable.g.cs | 56 + .../JsonConverters.UsageImagesSource.g.cs | 49 + ...nConverters.UsageImagesSourceNullable.g.cs | 56 + ...onverters.UsageModerationsBucketWidth.g.cs | 49 + ...s.UsageModerationsBucketWidthNullable.g.cs | 56 + ...onverters.UsageModerationsGroupByItem.g.cs | 49 + ...s.UsageModerationsGroupByItemNullable.g.cs | 56 + ...nverters.UsageModerationsResultObject.g.cs | 49 + ....UsageModerationsResultObjectNullable.g.cs | 56 + .../JsonConverters.UsageResponseObject.g.cs | 49 + ...onverters.UsageResponseObjectNullable.g.cs | 56 + .../JsonConverters.UsageTimeBucketObject.g.cs | 49 + ...verters.UsageTimeBucketObjectNullable.g.cs | 56 + ...meBucketResultItemDiscriminatorObject.g.cs | 49 + ...ResultItemDiscriminatorObjectNullable.g.cs | 56 + ...nverters.UsageVectorStoresBucketWidth.g.cs | 49 + ....UsageVectorStoresBucketWidthNullable.g.cs | 56 + ...nverters.UsageVectorStoresGroupByItem.g.cs | 49 + ....UsageVectorStoresGroupByItemNullable.g.cs | 56 + ...verters.UsageVectorStoresResultObject.g.cs | 49 + ...UsageVectorStoresResultObjectNullable.g.cs | 56 + .../Generated/JsonSerializerContext.g.cs | 149 +- .../Generated/JsonSerializerContextTypes.g.cs | 1642 ++++++++++------- .../OpenAI/Generated/OpenAI.IOpenAiApi.g.cs | 5 + ...penAI.IUsageClient.UsageAudioSpeeches.g.cs | 37 + ...IUsageClient.UsageAudioTranscriptions.g.cs | 37 + ...geClient.UsageCodeInterpreterSessions.g.cs | 31 + .../OpenAI.IUsageClient.UsageCompletions.g.cs | 39 + .../OpenAI.IUsageClient.UsageCosts.g.cs | 33 + .../OpenAI.IUsageClient.UsageEmbeddings.g.cs | 37 + .../OpenAI.IUsageClient.UsageImages.g.cs | 41 + .../OpenAI.IUsageClient.UsageModerations.g.cs | 37 + ...OpenAI.IUsageClient.UsageVectorStores.g.cs | 31 + .../OpenAI/Generated/OpenAI.IUsageClient.g.cs | 40 + .../OpenAI.Models.CostsResult.Json.g.cs | 92 + .../Generated/OpenAI.Models.CostsResult.g.cs | 75 + .../OpenAI.Models.CostsResultAmount.Json.g.cs | 92 + .../OpenAI.Models.CostsResultAmount.g.cs | 54 + .../OpenAI.Models.CostsResultObject.g.cs | 45 + ...AI.Models.CreateAssistantRequestModel.g.cs | 6 + ...dels.CreateChatCompletionRequestAudio.g.cs | 6 +- ...CreateChatCompletionRequestAudioVoice.g.cs | 3 +- ...dels.CreateChatCompletionRequestModel.g.cs | 6 + .../OpenAI.Models.CreateRunRequestModel.g.cs | 6 + ...Models.CreateThreadAndRunRequestModel.g.cs | 6 + ...timeClientEventConversationItemCreate.g.cs | 26 +- ...ClientEventConversationItemCreateType.g.cs | 45 + ...timeClientEventConversationItemDelete.g.cs | 19 +- ...ClientEventConversationItemDeleteType.g.cs | 45 + ...meClientEventConversationItemTruncate.g.cs | 40 +- ...ientEventConversationItemTruncateType.g.cs | 45 + ...timeClientEventInputAudioBufferAppend.g.cs | 31 +- ...ClientEventInputAudioBufferAppendType.g.cs | 45 + ...ltimeClientEventInputAudioBufferClear.g.cs | 17 +- ...eClientEventInputAudioBufferClearType.g.cs | 45 + ...timeClientEventInputAudioBufferCommit.g.cs | 25 +- ...ClientEventInputAudioBufferCommitType.g.cs | 45 + ...els.RealtimeClientEventResponseCancel.g.cs | 14 +- ...RealtimeClientEventResponseCancelType.g.cs | 45 + ...els.RealtimeClientEventResponseCreate.g.cs | 44 +- ...RealtimeClientEventResponseCreateType.g.cs | 45 + ...dels.RealtimeClientEventSessionUpdate.g.cs | 21 +- ....RealtimeClientEventSessionUpdateType.g.cs | 45 + ...ealtimeServerEventConversationCreated.g.cs | 14 +- ...rEventConversationCreatedConversation.g.cs | 4 +- ...imeServerEventConversationCreatedType.g.cs | 45 + ...imeServerEventConversationItemCreated.g.cs | 30 +- ...erverEventConversationItemCreatedType.g.cs | 45 + ...imeServerEventConversationItemDeleted.g.cs | 14 +- ...erverEventConversationItemDeletedType.g.cs | 45 + ...nItemInputAudioTranscriptionCompleted.g.cs | 27 +- ...mInputAudioTranscriptionCompletedType.g.cs | 46 + ...tionItemInputAudioTranscriptionFailed.g.cs | 20 +- ...ItemInputAudioTranscriptionFailedType.g.cs | 46 + ...eServerEventConversationItemTruncated.g.cs | 17 +- ...verEventConversationItemTruncatedType.g.cs | 45 + ...penAI.Models.RealtimeServerEventError.g.cs | 18 +- ...I.Models.RealtimeServerEventErrorType.g.cs | 45 + ...imeServerEventInputAudioBufferCleared.g.cs | 11 +- ...erverEventInputAudioBufferClearedType.g.cs | 45 + ...eServerEventInputAudioBufferCommitted.g.cs | 15 +- ...verEventInputAudioBufferCommittedType.g.cs | 45 + ...verEventInputAudioBufferSpeechStarted.g.cs | 30 +- ...ventInputAudioBufferSpeechStartedType.g.cs | 45 + ...verEventInputAudioBufferSpeechStopped.g.cs | 22 +- ...ventInputAudioBufferSpeechStoppedType.g.cs | 45 + ....RealtimeServerEventRateLimitsUpdated.g.cs | 15 +- ...ltimeServerEventRateLimitsUpdatedType.g.cs | 45 + ...RealtimeServerEventResponseAudioDelta.g.cs | 14 +- ...timeServerEventResponseAudioDeltaType.g.cs | 45 + ....RealtimeServerEventResponseAudioDone.g.cs | 17 +- ...ltimeServerEventResponseAudioDoneType.g.cs | 45 + ...rverEventResponseAudioTranscriptDelta.g.cs | 14 +- ...EventResponseAudioTranscriptDeltaType.g.cs | 45 + ...erverEventResponseAudioTranscriptDone.g.cs | 18 +- ...rEventResponseAudioTranscriptDoneType.g.cs | 45 + ...meServerEventResponseContentPartAdded.g.cs | 17 +- ...rverEventResponseContentPartAddedPart.g.cs | 5 +- ...EventResponseContentPartAddedPartType.g.cs | 51 + ...rverEventResponseContentPartAddedType.g.cs | 45 + ...imeServerEventResponseContentPartDone.g.cs | 17 +- ...erverEventResponseContentPartDoneType.g.cs | 45 + ...ls.RealtimeServerEventResponseCreated.g.cs | 13 +- ...ealtimeServerEventResponseCreatedType.g.cs | 45 + ...odels.RealtimeServerEventResponseDone.g.cs | 18 +- ...s.RealtimeServerEventResponseDoneType.g.cs | 45 + ...entResponseFunctionCallArgumentsDelta.g.cs | 14 +- ...esponseFunctionCallArgumentsDeltaType.g.cs | 45 + ...ventResponseFunctionCallArgumentsDone.g.cs | 17 +- ...ResponseFunctionCallArgumentsDoneType.g.cs | 45 + ...imeServerEventResponseOutputItemAdded.g.cs | 10 +- ...erverEventResponseOutputItemAddedType.g.cs | 45 + ...timeServerEventResponseOutputItemDone.g.cs | 13 +- ...ServerEventResponseOutputItemDoneType.g.cs | 45 + ....RealtimeServerEventResponseTextDelta.g.cs | 14 +- ...ltimeServerEventResponseTextDeltaType.g.cs | 45 + ...s.RealtimeServerEventResponseTextDone.g.cs | 17 +- ...altimeServerEventResponseTextDoneType.g.cs | 45 + ...els.RealtimeServerEventSessionCreated.g.cs | 14 +- ...RealtimeServerEventSessionCreatedType.g.cs | 45 + ...els.RealtimeServerEventSessionUpdated.g.cs | 17 +- ...RealtimeServerEventSessionUpdatedType.g.cs | 45 + .../OpenAI.Models.ResultItem.Json.g.cs | 92 + .../Generated/OpenAI.Models.ResultItem.g.cs | 579 ++++++ ....Models.UsageAudioSpeechesBucketWidth.g.cs | 57 + ....Models.UsageAudioSpeechesGroupByItem.g.cs | 63 + ....Models.UsageAudioSpeechesResult.Json.g.cs | 92 + ...penAI.Models.UsageAudioSpeechesResult.g.cs | 110 ++ ...Models.UsageAudioSpeechesResultObject.g.cs | 45 + ...s.UsageAudioTranscriptionsBucketWidth.g.cs | 57 + ...s.UsageAudioTranscriptionsGroupByItem.g.cs | 63 + ...s.UsageAudioTranscriptionsResult.Json.g.cs | 92 + ...Models.UsageAudioTranscriptionsResult.g.cs | 110 ++ ....UsageAudioTranscriptionsResultObject.g.cs | 45 + ...ageCodeInterpreterSessionsBucketWidth.g.cs | 57 + ...ageCodeInterpreterSessionsGroupByItem.g.cs | 45 + ...ageCodeInterpreterSessionsResult.Json.g.cs | 92 + ...ls.UsageCodeInterpreterSessionsResult.g.cs | 65 + ...geCodeInterpreterSessionsResultObject.g.cs | 45 + ...AI.Models.UsageCompletionsBucketWidth.g.cs | 57 + ...AI.Models.UsageCompletionsGroupByItem.g.cs | 69 + ...AI.Models.UsageCompletionsResult.Json.g.cs | 92 + .../OpenAI.Models.UsageCompletionsResult.g.cs | 144 ++ ...I.Models.UsageCompletionsResultObject.g.cs | 45 + .../OpenAI.Models.UsageCostsBucketWidth.g.cs | 45 + .../OpenAI.Models.UsageCostsGroupByItem.g.cs | 51 + ...nAI.Models.UsageEmbeddingsBucketWidth.g.cs | 57 + ...nAI.Models.UsageEmbeddingsGroupByItem.g.cs | 63 + ...nAI.Models.UsageEmbeddingsResult.Json.g.cs | 92 + .../OpenAI.Models.UsageEmbeddingsResult.g.cs | 110 ++ ...AI.Models.UsageEmbeddingsResultObject.g.cs | 45 + .../OpenAI.Models.UsageImagesBucketWidth.g.cs | 57 + .../OpenAI.Models.UsageImagesGroupByItem.g.cs | 75 + .../OpenAI.Models.UsageImagesResult.Json.g.cs | 92 + .../OpenAI.Models.UsageImagesResult.g.cs | 132 ++ ...OpenAI.Models.UsageImagesResultObject.g.cs | 45 + .../OpenAI.Models.UsageImagesSize.g.cs | 69 + .../OpenAI.Models.UsageImagesSource.g.cs | 57 + ...AI.Models.UsageModerationsBucketWidth.g.cs | 57 + ...AI.Models.UsageModerationsGroupByItem.g.cs | 63 + ...AI.Models.UsageModerationsResult.Json.g.cs | 92 + .../OpenAI.Models.UsageModerationsResult.g.cs | 110 ++ ...I.Models.UsageModerationsResultObject.g.cs | 45 + .../OpenAI.Models.UsageResponse.Json.g.cs | 92 + .../OpenAI.Models.UsageResponse.g.cs | 72 + .../OpenAI.Models.UsageResponseObject.g.cs | 45 + .../OpenAI.Models.UsageTimeBucket.Json.g.cs | 92 + .../OpenAI.Models.UsageTimeBucket.g.cs | 72 + .../OpenAI.Models.UsageTimeBucketObject.g.cs | 45 + ...imeBucketResultItemDiscriminator.Json.g.cs | 92 + ...sageTimeBucketResultItemDiscriminator.g.cs | 42 + ...meBucketResultItemDiscriminatorObject.g.cs | 93 + ...I.Models.UsageVectorStoresBucketWidth.g.cs | 57 + ...I.Models.UsageVectorStoresGroupByItem.g.cs | 45 + ...I.Models.UsageVectorStoresResult.Json.g.cs | 92 + ...OpenAI.Models.UsageVectorStoresResult.g.cs | 65 + ....Models.UsageVectorStoresResultObject.g.cs | 45 + .../OpenAI/Generated/OpenAI.OpenAiApi.g.cs | 9 + ...OpenAI.UsageClient.UsageAudioSpeeches.g.cs | 219 +++ ....UsageClient.UsageAudioTranscriptions.g.cs | 219 +++ ...geClient.UsageCodeInterpreterSessions.g.cs | 198 ++ .../OpenAI.UsageClient.UsageCompletions.g.cs | 226 +++ .../OpenAI.UsageClient.UsageCosts.g.cs | 200 ++ .../OpenAI.UsageClient.UsageEmbeddings.g.cs | 219 +++ .../OpenAI.UsageClient.UsageImages.g.cs | 231 +++ .../OpenAI.UsageClient.UsageModerations.g.cs | 219 +++ .../OpenAI.UsageClient.UsageVectorStores.g.cs | 198 ++ .../OpenAI/Generated/OpenAI.UsageClient.g.cs | 86 + src/libs/OpenAI/openapi.yaml | 1466 ++++++++++++++- 309 files changed, 19394 insertions(+), 1028 deletions(-) create mode 100644 src/libs/OpenAI/Generated/JsonConverters.CostsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.CostsResultObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemCreateType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemCreateTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemDeleteType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemDeleteTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemTruncateType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemTruncateTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferAppendType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferAppendTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferClearType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferClearTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferCommitType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferCommitTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCancelType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCancelTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCreateType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCreateTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventSessionUpdateType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventSessionUpdateTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationCreatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationCreatedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemCreatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemCreatedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemDeletedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemDeletedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemTruncatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemTruncatedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventErrorType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventErrorTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferClearedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferClearedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferCommittedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventRateLimitsUpdatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDeltaType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDeltaTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDoneTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedPartType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartDoneTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseCreatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseCreatedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseDoneTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemAddedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemAddedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemDoneTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDeltaType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDeltaTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDoneTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionCreatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionCreatedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionUpdatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionUpdatedTypeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.ResultItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesBucketWidthNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesGroupByItemNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesResultObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsBucketWidthNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsGroupByItemNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsResultObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsBucketWidthNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsGroupByItemNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsResultObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsBucketWidthNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsGroupByItemNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsResultObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCostsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCostsBucketWidthNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCostsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageCostsGroupByItemNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsBucketWidthNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsGroupByItemNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsResultObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesBucketWidthNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesGroupByItemNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesResultObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesSize.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesSizeNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesSource.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageImagesSourceNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageModerationsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageModerationsBucketWidthNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageModerationsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageModerationsGroupByItemNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageModerationsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageModerationsResultObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageResponseObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageResponseObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketResultItemDiscriminatorObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketResultItemDiscriminatorObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresBucketWidthNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresGroupByItemNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresResultObjectNullable.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageAudioSpeeches.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageAudioTranscriptions.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCodeInterpreterSessions.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCompletions.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCosts.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageEmbeddings.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageImages.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageModerations.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageVectorStores.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.IUsageClient.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.CostsResult.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.CostsResult.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.CostsResultAmount.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.CostsResultAmount.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.CostsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemCreateType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemDeleteType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemTruncateType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferAppendType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferClearType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferCommitType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCancelType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCreateType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventSessionUpdateType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemCreatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemDeletedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemTruncatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventErrorType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferClearedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStartedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStoppedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventRateLimitsUpdatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDeltaType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDeltaType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedPartType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseCreatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDeltaType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemAddedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDeltaType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDoneType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionCreatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionUpdatedType.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.ResultItem.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.ResultItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResult.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResult.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResult.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResult.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResult.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResult.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResult.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResult.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCostsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageCostsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResult.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResult.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResult.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResult.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesSize.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesSource.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResult.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResult.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageResponse.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageResponse.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageResponseObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucket.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucket.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminator.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminator.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminatorObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresBucketWidth.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresGroupByItem.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResult.Json.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResult.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResultObject.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageAudioSpeeches.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageAudioTranscriptions.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCodeInterpreterSessions.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCompletions.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCosts.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageEmbeddings.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageImages.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageModerations.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageVectorStores.g.cs create mode 100644 src/libs/OpenAI/Generated/OpenAI.UsageClient.g.cs diff --git a/src/libs/OpenAI/Generated/JsonConverters.CostsResultObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CostsResultObject.g.cs new file mode 100644 index 00000000..12ecfc6b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CostsResultObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CostsResultObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CostsResultObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CostsResultObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CostsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CostsResultObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.CostsResultObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.CostsResultObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.CostsResultObjectNullable.g.cs new file mode 100644 index 00000000..9aadcc0d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.CostsResultObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class CostsResultObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.CostsResultObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.CostsResultObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.CostsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.CostsResultObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.CostsResultObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemCreateType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemCreateType.g.cs new file mode 100644 index 00000000..f2c11bb6 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemCreateType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventConversationItemCreateTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventConversationItemCreateType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventConversationItemCreateTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventConversationItemCreateType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventConversationItemCreateType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeClientEventConversationItemCreateTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemCreateTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemCreateTypeNullable.g.cs new file mode 100644 index 00000000..7805f035 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemCreateTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventConversationItemCreateTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventConversationItemCreateType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventConversationItemCreateTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventConversationItemCreateType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventConversationItemCreateType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeClientEventConversationItemCreateTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemDeleteType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemDeleteType.g.cs new file mode 100644 index 00000000..159e9763 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemDeleteType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventConversationItemDeleteTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventConversationItemDeleteType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventConversationItemDeleteTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventConversationItemDeleteType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventConversationItemDeleteType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeClientEventConversationItemDeleteTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemDeleteTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemDeleteTypeNullable.g.cs new file mode 100644 index 00000000..b5c64c93 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemDeleteTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventConversationItemDeleteTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventConversationItemDeleteType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventConversationItemDeleteTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventConversationItemDeleteType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventConversationItemDeleteType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeClientEventConversationItemDeleteTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemTruncateType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemTruncateType.g.cs new file mode 100644 index 00000000..57331a00 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemTruncateType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventConversationItemTruncateTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventConversationItemTruncateType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventConversationItemTruncateTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventConversationItemTruncateType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventConversationItemTruncateType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeClientEventConversationItemTruncateTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemTruncateTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemTruncateTypeNullable.g.cs new file mode 100644 index 00000000..84ceee61 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventConversationItemTruncateTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventConversationItemTruncateTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventConversationItemTruncateType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventConversationItemTruncateTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventConversationItemTruncateType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventConversationItemTruncateType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeClientEventConversationItemTruncateTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferAppendType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferAppendType.g.cs new file mode 100644 index 00000000..d36e7305 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferAppendType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventInputAudioBufferAppendTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventInputAudioBufferAppendType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventInputAudioBufferAppendTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventInputAudioBufferAppendType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventInputAudioBufferAppendType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeClientEventInputAudioBufferAppendTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferAppendTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferAppendTypeNullable.g.cs new file mode 100644 index 00000000..a4d6c8c7 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferAppendTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventInputAudioBufferAppendTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventInputAudioBufferAppendType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventInputAudioBufferAppendTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventInputAudioBufferAppendType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventInputAudioBufferAppendType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeClientEventInputAudioBufferAppendTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferClearType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferClearType.g.cs new file mode 100644 index 00000000..416e7a4c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferClearType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventInputAudioBufferClearTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventInputAudioBufferClearType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventInputAudioBufferClearTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventInputAudioBufferClearType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventInputAudioBufferClearType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeClientEventInputAudioBufferClearTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferClearTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferClearTypeNullable.g.cs new file mode 100644 index 00000000..ad543aaa --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferClearTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventInputAudioBufferClearTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventInputAudioBufferClearType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventInputAudioBufferClearTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventInputAudioBufferClearType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventInputAudioBufferClearType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeClientEventInputAudioBufferClearTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferCommitType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferCommitType.g.cs new file mode 100644 index 00000000..ddb73518 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferCommitType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventInputAudioBufferCommitTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventInputAudioBufferCommitType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventInputAudioBufferCommitTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventInputAudioBufferCommitType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventInputAudioBufferCommitType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeClientEventInputAudioBufferCommitTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferCommitTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferCommitTypeNullable.g.cs new file mode 100644 index 00000000..424e0f2e --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventInputAudioBufferCommitTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventInputAudioBufferCommitTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventInputAudioBufferCommitType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventInputAudioBufferCommitTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventInputAudioBufferCommitType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventInputAudioBufferCommitType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeClientEventInputAudioBufferCommitTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCancelType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCancelType.g.cs new file mode 100644 index 00000000..fc2badb7 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCancelType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventResponseCancelTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventResponseCancelType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventResponseCancelTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventResponseCancelType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventResponseCancelType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeClientEventResponseCancelTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCancelTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCancelTypeNullable.g.cs new file mode 100644 index 00000000..4a2cb0c5 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCancelTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventResponseCancelTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventResponseCancelType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventResponseCancelTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventResponseCancelType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventResponseCancelType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeClientEventResponseCancelTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCreateType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCreateType.g.cs new file mode 100644 index 00000000..06045d9d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCreateType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventResponseCreateTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventResponseCreateType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventResponseCreateTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventResponseCreateType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventResponseCreateType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeClientEventResponseCreateTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCreateTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCreateTypeNullable.g.cs new file mode 100644 index 00000000..b9e0c97f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventResponseCreateTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventResponseCreateTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventResponseCreateType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventResponseCreateTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventResponseCreateType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventResponseCreateType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeClientEventResponseCreateTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventSessionUpdateType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventSessionUpdateType.g.cs new file mode 100644 index 00000000..9e5ddf9b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventSessionUpdateType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventSessionUpdateTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventSessionUpdateType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventSessionUpdateTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventSessionUpdateType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventSessionUpdateType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeClientEventSessionUpdateTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventSessionUpdateTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventSessionUpdateTypeNullable.g.cs new file mode 100644 index 00000000..4dddeceb --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeClientEventSessionUpdateTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeClientEventSessionUpdateTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeClientEventSessionUpdateType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeClientEventSessionUpdateTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeClientEventSessionUpdateType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeClientEventSessionUpdateType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeClientEventSessionUpdateTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationCreatedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationCreatedType.g.cs new file mode 100644 index 00000000..db89da9f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationCreatedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationCreatedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationCreatedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationCreatedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationCreatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationCreatedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationCreatedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationCreatedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationCreatedTypeNullable.g.cs new file mode 100644 index 00000000..ef2551ad --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationCreatedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationCreatedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationCreatedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationCreatedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationCreatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationCreatedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationCreatedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemCreatedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemCreatedType.g.cs new file mode 100644 index 00000000..a66685a0 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemCreatedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemCreatedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemCreatedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemCreatedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemCreatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemCreatedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemCreatedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemCreatedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemCreatedTypeNullable.g.cs new file mode 100644 index 00000000..6fceead6 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemCreatedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemCreatedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemCreatedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemCreatedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemCreatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemCreatedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemCreatedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemDeletedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemDeletedType.g.cs new file mode 100644 index 00000000..85327708 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemDeletedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemDeletedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemDeletedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemDeletedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemDeletedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemDeletedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemDeletedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemDeletedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemDeletedTypeNullable.g.cs new file mode 100644 index 00000000..54fc5be0 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemDeletedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemDeletedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemDeletedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemDeletedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemDeletedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemDeletedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemDeletedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.g.cs new file mode 100644 index 00000000..7ac5cd3d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeNullable.g.cs new file mode 100644 index 00000000..c992d966 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.g.cs new file mode 100644 index 00000000..81c9e218 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeNullable.g.cs new file mode 100644 index 00000000..30ecd8b2 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemTruncatedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemTruncatedType.g.cs new file mode 100644 index 00000000..0d54dc58 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemTruncatedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemTruncatedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemTruncatedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemTruncatedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemTruncatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemTruncatedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemTruncatedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemTruncatedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemTruncatedTypeNullable.g.cs new file mode 100644 index 00000000..59098a08 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventConversationItemTruncatedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventConversationItemTruncatedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventConversationItemTruncatedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventConversationItemTruncatedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventConversationItemTruncatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventConversationItemTruncatedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventConversationItemTruncatedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventErrorType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventErrorType.g.cs new file mode 100644 index 00000000..56c4b9a3 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventErrorType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventErrorTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventErrorType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventErrorTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventErrorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventErrorType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventErrorTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventErrorTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventErrorTypeNullable.g.cs new file mode 100644 index 00000000..6b746343 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventErrorTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventErrorTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventErrorType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventErrorTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventErrorType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventErrorType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventErrorTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferClearedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferClearedType.g.cs new file mode 100644 index 00000000..2139eed9 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferClearedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferClearedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventInputAudioBufferClearedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventInputAudioBufferClearedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventInputAudioBufferClearedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventInputAudioBufferClearedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventInputAudioBufferClearedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferClearedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferClearedTypeNullable.g.cs new file mode 100644 index 00000000..c0d138b7 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferClearedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferClearedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventInputAudioBufferClearedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventInputAudioBufferClearedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventInputAudioBufferClearedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventInputAudioBufferClearedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventInputAudioBufferClearedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferCommittedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferCommittedType.g.cs new file mode 100644 index 00000000..f0d7985e --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferCommittedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferCommittedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventInputAudioBufferCommittedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventInputAudioBufferCommittedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventInputAudioBufferCommittedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventInputAudioBufferCommittedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventInputAudioBufferCommittedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeNullable.g.cs new file mode 100644 index 00000000..8f63da7b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferCommittedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventInputAudioBufferCommittedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventInputAudioBufferCommittedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventInputAudioBufferCommittedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventInputAudioBufferCommittedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventInputAudioBufferCommittedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedType.g.cs new file mode 100644 index 00000000..838d8f2f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferSpeechStartedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeNullable.g.cs new file mode 100644 index 00000000..917e92a0 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferSpeechStartedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedType.g.cs new file mode 100644 index 00000000..ac6686a3 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferSpeechStoppedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeNullable.g.cs new file mode 100644 index 00000000..edce61b6 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventInputAudioBufferSpeechStoppedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventRateLimitsUpdatedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventRateLimitsUpdatedType.g.cs new file mode 100644 index 00000000..fbf6c432 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventRateLimitsUpdatedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventRateLimitsUpdatedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventRateLimitsUpdatedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventRateLimitsUpdatedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventRateLimitsUpdatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventRateLimitsUpdatedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventRateLimitsUpdatedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeNullable.g.cs new file mode 100644 index 00000000..0c47454b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventRateLimitsUpdatedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventRateLimitsUpdatedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventRateLimitsUpdatedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventRateLimitsUpdatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventRateLimitsUpdatedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventRateLimitsUpdatedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDeltaType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDeltaType.g.cs new file mode 100644 index 00000000..a9009378 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDeltaType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseAudioDeltaTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseAudioDeltaType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseAudioDeltaTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseAudioDeltaType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseAudioDeltaType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseAudioDeltaTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDeltaTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDeltaTypeNullable.g.cs new file mode 100644 index 00000000..7ed5f647 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDeltaTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseAudioDeltaTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseAudioDeltaType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseAudioDeltaTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseAudioDeltaType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseAudioDeltaType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseAudioDeltaTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDoneType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDoneType.g.cs new file mode 100644 index 00000000..238b5a62 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDoneType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseAudioDoneTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseAudioDoneType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseAudioDoneTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseAudioDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseAudioDoneType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseAudioDoneTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDoneTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDoneTypeNullable.g.cs new file mode 100644 index 00000000..87071a5a --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioDoneTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseAudioDoneTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseAudioDoneType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseAudioDoneTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseAudioDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseAudioDoneType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseAudioDoneTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaType.g.cs new file mode 100644 index 00000000..df371d8c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseAudioTranscriptDeltaTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeNullable.g.cs new file mode 100644 index 00000000..73920b6b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseAudioTranscriptDeltaTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneType.g.cs new file mode 100644 index 00000000..ce9c2b9a --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseAudioTranscriptDoneTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeNullable.g.cs new file mode 100644 index 00000000..625a0e68 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseAudioTranscriptDoneTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedPartType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedPartType.g.cs new file mode 100644 index 00000000..ae66f8aa --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedPartType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseContentPartAddedPartTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseContentPartAddedPartType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseContentPartAddedPartTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseContentPartAddedPartType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseContentPartAddedPartType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseContentPartAddedPartTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeNullable.g.cs new file mode 100644 index 00000000..c5868cdb --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseContentPartAddedPartTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseContentPartAddedPartType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseContentPartAddedPartTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseContentPartAddedPartType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseContentPartAddedPartType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseContentPartAddedPartTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedType.g.cs new file mode 100644 index 00000000..0f1c3a95 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseContentPartAddedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseContentPartAddedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseContentPartAddedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseContentPartAddedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseContentPartAddedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseContentPartAddedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedTypeNullable.g.cs new file mode 100644 index 00000000..a0a45b7d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartAddedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseContentPartAddedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseContentPartAddedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseContentPartAddedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseContentPartAddedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseContentPartAddedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseContentPartAddedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartDoneType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartDoneType.g.cs new file mode 100644 index 00000000..a25f89a1 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartDoneType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseContentPartDoneTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseContentPartDoneType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseContentPartDoneTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseContentPartDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseContentPartDoneType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseContentPartDoneTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartDoneTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartDoneTypeNullable.g.cs new file mode 100644 index 00000000..36c2c906 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseContentPartDoneTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseContentPartDoneTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseContentPartDoneType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseContentPartDoneTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseContentPartDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseContentPartDoneType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseContentPartDoneTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseCreatedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseCreatedType.g.cs new file mode 100644 index 00000000..8bb2612b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseCreatedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseCreatedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseCreatedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseCreatedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseCreatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseCreatedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseCreatedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseCreatedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseCreatedTypeNullable.g.cs new file mode 100644 index 00000000..550b4ce3 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseCreatedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseCreatedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseCreatedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseCreatedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseCreatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseCreatedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseCreatedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseDoneType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseDoneType.g.cs new file mode 100644 index 00000000..9fad2583 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseDoneType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseDoneTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseDoneType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseDoneTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseDoneType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseDoneTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseDoneTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseDoneTypeNullable.g.cs new file mode 100644 index 00000000..e5a664ef --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseDoneTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseDoneTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseDoneType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseDoneTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseDoneType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseDoneTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaType.g.cs new file mode 100644 index 00000000..95d5a047 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeNullable.g.cs new file mode 100644 index 00000000..bdfe5ef9 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneType.g.cs new file mode 100644 index 00000000..36d2cf68 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseFunctionCallArgumentsDoneTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeNullable.g.cs new file mode 100644 index 00000000..242945d5 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseFunctionCallArgumentsDoneTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemAddedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemAddedType.g.cs new file mode 100644 index 00000000..38639fe9 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemAddedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseOutputItemAddedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseOutputItemAddedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseOutputItemAddedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseOutputItemAddedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseOutputItemAddedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseOutputItemAddedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemAddedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemAddedTypeNullable.g.cs new file mode 100644 index 00000000..a4f0806c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemAddedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseOutputItemAddedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseOutputItemAddedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseOutputItemAddedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseOutputItemAddedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseOutputItemAddedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseOutputItemAddedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemDoneType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemDoneType.g.cs new file mode 100644 index 00000000..76fb30cb --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemDoneType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseOutputItemDoneTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseOutputItemDoneType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseOutputItemDoneTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseOutputItemDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseOutputItemDoneType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseOutputItemDoneTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemDoneTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemDoneTypeNullable.g.cs new file mode 100644 index 00000000..d5a20a16 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseOutputItemDoneTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseOutputItemDoneTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseOutputItemDoneType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseOutputItemDoneTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseOutputItemDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseOutputItemDoneType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseOutputItemDoneTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDeltaType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDeltaType.g.cs new file mode 100644 index 00000000..384d0ac2 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDeltaType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseTextDeltaTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseTextDeltaType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseTextDeltaTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseTextDeltaType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseTextDeltaType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseTextDeltaTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDeltaTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDeltaTypeNullable.g.cs new file mode 100644 index 00000000..45151d68 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDeltaTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseTextDeltaTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseTextDeltaType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseTextDeltaTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseTextDeltaType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseTextDeltaType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseTextDeltaTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDoneType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDoneType.g.cs new file mode 100644 index 00000000..4294f954 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDoneType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseTextDoneTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseTextDoneType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseTextDoneTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseTextDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseTextDoneType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseTextDoneTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDoneTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDoneTypeNullable.g.cs new file mode 100644 index 00000000..5e2f81b5 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventResponseTextDoneTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventResponseTextDoneTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventResponseTextDoneType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventResponseTextDoneTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventResponseTextDoneType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventResponseTextDoneType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventResponseTextDoneTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionCreatedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionCreatedType.g.cs new file mode 100644 index 00000000..5cbda860 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionCreatedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventSessionCreatedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventSessionCreatedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventSessionCreatedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventSessionCreatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventSessionCreatedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventSessionCreatedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionCreatedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionCreatedTypeNullable.g.cs new file mode 100644 index 00000000..36db31bf --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionCreatedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventSessionCreatedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventSessionCreatedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventSessionCreatedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventSessionCreatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventSessionCreatedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventSessionCreatedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionUpdatedType.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionUpdatedType.g.cs new file mode 100644 index 00000000..bd2d43a8 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionUpdatedType.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventSessionUpdatedTypeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventSessionUpdatedType Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventSessionUpdatedTypeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventSessionUpdatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventSessionUpdatedType value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.RealtimeServerEventSessionUpdatedTypeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionUpdatedTypeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionUpdatedTypeNullable.g.cs new file mode 100644 index 00000000..31fb355d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.RealtimeServerEventSessionUpdatedTypeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class RealtimeServerEventSessionUpdatedTypeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.RealtimeServerEventSessionUpdatedType? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.RealtimeServerEventSessionUpdatedTypeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.RealtimeServerEventSessionUpdatedType)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.RealtimeServerEventSessionUpdatedType? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.RealtimeServerEventSessionUpdatedTypeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.ResultItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.ResultItem.g.cs new file mode 100644 index 00000000..125276ae --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.ResultItem.g.cs @@ -0,0 +1,169 @@ +#nullable enable +#pragma warning disable CS0618 // Type or member is obsolete + +namespace OpenAI.JsonConverters +{ + /// + public class ResultItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.ResultItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + + var readerCopy = reader; + var discriminatorTypeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageTimeBucketResultItemDiscriminator), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.UsageTimeBucketResultItemDiscriminator)}"); + var discriminator = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, discriminatorTypeInfo); + + global::OpenAI.UsageCompletionsResult? organizationUsageCompletionsResult = default; + if (discriminator?.Object == global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageCompletionsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageCompletionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.UsageCompletionsResult)}"); + organizationUsageCompletionsResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.UsageEmbeddingsResult? organizationUsageEmbeddingsResult = default; + if (discriminator?.Object == global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageEmbeddingsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageEmbeddingsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.UsageEmbeddingsResult)}"); + organizationUsageEmbeddingsResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.UsageModerationsResult? organizationUsageModerationsResult = default; + if (discriminator?.Object == global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageModerationsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageModerationsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.UsageModerationsResult)}"); + organizationUsageModerationsResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.UsageImagesResult? organizationUsageImagesResult = default; + if (discriminator?.Object == global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageImagesResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageImagesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.UsageImagesResult)}"); + organizationUsageImagesResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.UsageAudioSpeechesResult? organizationUsageAudioSpeechesResult = default; + if (discriminator?.Object == global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageAudioSpeechesResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageAudioSpeechesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.UsageAudioSpeechesResult)}"); + organizationUsageAudioSpeechesResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.UsageAudioTranscriptionsResult? organizationUsageAudioTranscriptionsResult = default; + if (discriminator?.Object == global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageAudioTranscriptionsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageAudioTranscriptionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.UsageAudioTranscriptionsResult)}"); + organizationUsageAudioTranscriptionsResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.UsageVectorStoresResult? organizationUsageVectorStoresResult = default; + if (discriminator?.Object == global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageVectorStoresResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageVectorStoresResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.UsageVectorStoresResult)}"); + organizationUsageVectorStoresResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.UsageCodeInterpreterSessionsResult? organizationUsageCodeInterpreterSessionsResult = default; + if (discriminator?.Object == global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageCodeInterpreterSessionsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageCodeInterpreterSessionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.UsageCodeInterpreterSessionsResult)}"); + organizationUsageCodeInterpreterSessionsResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + global::OpenAI.CostsResult? organizationCostsResult = default; + if (discriminator?.Object == global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject.OrganizationCostsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CostsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {nameof(global::OpenAI.CostsResult)}"); + organizationCostsResult = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo); + } + + var result = new global::OpenAI.ResultItem( + discriminator?.Object, + organizationUsageCompletionsResult, + organizationUsageEmbeddingsResult, + organizationUsageModerationsResult, + organizationUsageImagesResult, + organizationUsageAudioSpeechesResult, + organizationUsageAudioTranscriptionsResult, + organizationUsageVectorStoresResult, + organizationUsageCodeInterpreterSessionsResult, + organizationCostsResult + ); + + return result; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.ResultItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + options = options ?? throw new global::System.ArgumentNullException(nameof(options)); + var typeInfoResolver = options.TypeInfoResolver ?? throw new global::System.InvalidOperationException("TypeInfoResolver is not set."); + + if (value.IsOrganizationUsageCompletionsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageCompletionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.UsageCompletionsResult).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrganizationUsageCompletionsResult, typeInfo); + } + else if (value.IsOrganizationUsageEmbeddingsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageEmbeddingsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.UsageEmbeddingsResult).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrganizationUsageEmbeddingsResult, typeInfo); + } + else if (value.IsOrganizationUsageModerationsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageModerationsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.UsageModerationsResult).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrganizationUsageModerationsResult, typeInfo); + } + else if (value.IsOrganizationUsageImagesResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageImagesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.UsageImagesResult).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrganizationUsageImagesResult, typeInfo); + } + else if (value.IsOrganizationUsageAudioSpeechesResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageAudioSpeechesResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.UsageAudioSpeechesResult).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrganizationUsageAudioSpeechesResult, typeInfo); + } + else if (value.IsOrganizationUsageAudioTranscriptionsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageAudioTranscriptionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.UsageAudioTranscriptionsResult).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrganizationUsageAudioTranscriptionsResult, typeInfo); + } + else if (value.IsOrganizationUsageVectorStoresResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageVectorStoresResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.UsageVectorStoresResult).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrganizationUsageVectorStoresResult, typeInfo); + } + else if (value.IsOrganizationUsageCodeInterpreterSessionsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.UsageCodeInterpreterSessionsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.UsageCodeInterpreterSessionsResult).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrganizationUsageCodeInterpreterSessionsResult, typeInfo); + } + else if (value.IsOrganizationCostsResult) + { + var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::OpenAI.CostsResult), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo ?? + throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::OpenAI.CostsResult).Name}"); + global::System.Text.Json.JsonSerializer.Serialize(writer, value.OrganizationCostsResult, typeInfo); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesBucketWidth.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesBucketWidth.g.cs new file mode 100644 index 00000000..172139cd --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesBucketWidth.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioSpeechesBucketWidthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioSpeechesBucketWidth Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioSpeechesBucketWidthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioSpeechesBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioSpeechesBucketWidth value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageAudioSpeechesBucketWidthExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesBucketWidthNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesBucketWidthNullable.g.cs new file mode 100644 index 00000000..bc2866e7 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesBucketWidthNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioSpeechesBucketWidthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioSpeechesBucketWidth? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioSpeechesBucketWidthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioSpeechesBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioSpeechesBucketWidth? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageAudioSpeechesBucketWidthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesGroupByItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesGroupByItem.g.cs new file mode 100644 index 00000000..37a409a6 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesGroupByItem.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioSpeechesGroupByItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioSpeechesGroupByItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioSpeechesGroupByItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioSpeechesGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioSpeechesGroupByItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageAudioSpeechesGroupByItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesGroupByItemNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesGroupByItemNullable.g.cs new file mode 100644 index 00000000..5149cfa3 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesGroupByItemNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioSpeechesGroupByItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioSpeechesGroupByItem? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioSpeechesGroupByItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioSpeechesGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioSpeechesGroupByItem? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageAudioSpeechesGroupByItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesResultObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesResultObject.g.cs new file mode 100644 index 00000000..23abebc4 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesResultObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioSpeechesResultObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioSpeechesResultObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioSpeechesResultObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioSpeechesResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioSpeechesResultObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageAudioSpeechesResultObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesResultObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesResultObjectNullable.g.cs new file mode 100644 index 00000000..efc6b634 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioSpeechesResultObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioSpeechesResultObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioSpeechesResultObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioSpeechesResultObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioSpeechesResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioSpeechesResultObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageAudioSpeechesResultObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsBucketWidth.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsBucketWidth.g.cs new file mode 100644 index 00000000..a4c86ca4 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsBucketWidth.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioTranscriptionsBucketWidthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioTranscriptionsBucketWidth Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioTranscriptionsBucketWidthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioTranscriptionsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioTranscriptionsBucketWidth value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageAudioTranscriptionsBucketWidthExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsBucketWidthNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsBucketWidthNullable.g.cs new file mode 100644 index 00000000..0ef6c62a --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsBucketWidthNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioTranscriptionsBucketWidthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioTranscriptionsBucketWidth? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioTranscriptionsBucketWidthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioTranscriptionsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioTranscriptionsBucketWidth? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageAudioTranscriptionsBucketWidthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsGroupByItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsGroupByItem.g.cs new file mode 100644 index 00000000..1bade61b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsGroupByItem.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioTranscriptionsGroupByItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioTranscriptionsGroupByItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioTranscriptionsGroupByItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioTranscriptionsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioTranscriptionsGroupByItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageAudioTranscriptionsGroupByItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsGroupByItemNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsGroupByItemNullable.g.cs new file mode 100644 index 00000000..b3cb9e85 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsGroupByItemNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioTranscriptionsGroupByItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioTranscriptionsGroupByItem? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioTranscriptionsGroupByItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioTranscriptionsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioTranscriptionsGroupByItem? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageAudioTranscriptionsGroupByItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsResultObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsResultObject.g.cs new file mode 100644 index 00000000..e5cba1d7 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsResultObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioTranscriptionsResultObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioTranscriptionsResultObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioTranscriptionsResultObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioTranscriptionsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioTranscriptionsResultObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageAudioTranscriptionsResultObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsResultObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsResultObjectNullable.g.cs new file mode 100644 index 00000000..e9b9ee6e --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageAudioTranscriptionsResultObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageAudioTranscriptionsResultObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageAudioTranscriptionsResultObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageAudioTranscriptionsResultObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageAudioTranscriptionsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageAudioTranscriptionsResultObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageAudioTranscriptionsResultObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsBucketWidth.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsBucketWidth.g.cs new file mode 100644 index 00000000..4623d922 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsBucketWidth.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCodeInterpreterSessionsBucketWidthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCodeInterpreterSessionsBucketWidth Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCodeInterpreterSessionsBucketWidthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCodeInterpreterSessionsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCodeInterpreterSessionsBucketWidth value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageCodeInterpreterSessionsBucketWidthExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsBucketWidthNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsBucketWidthNullable.g.cs new file mode 100644 index 00000000..0019eeea --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsBucketWidthNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCodeInterpreterSessionsBucketWidthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCodeInterpreterSessionsBucketWidth? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCodeInterpreterSessionsBucketWidthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCodeInterpreterSessionsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCodeInterpreterSessionsBucketWidth? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageCodeInterpreterSessionsBucketWidthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsGroupByItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsGroupByItem.g.cs new file mode 100644 index 00000000..1de488ca --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsGroupByItem.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCodeInterpreterSessionsGroupByItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCodeInterpreterSessionsGroupByItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCodeInterpreterSessionsGroupByItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCodeInterpreterSessionsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCodeInterpreterSessionsGroupByItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageCodeInterpreterSessionsGroupByItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsGroupByItemNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsGroupByItemNullable.g.cs new file mode 100644 index 00000000..6704711e --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsGroupByItemNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCodeInterpreterSessionsGroupByItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCodeInterpreterSessionsGroupByItem? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCodeInterpreterSessionsGroupByItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCodeInterpreterSessionsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCodeInterpreterSessionsGroupByItem? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageCodeInterpreterSessionsGroupByItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsResultObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsResultObject.g.cs new file mode 100644 index 00000000..5ba35e61 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsResultObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCodeInterpreterSessionsResultObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCodeInterpreterSessionsResultObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCodeInterpreterSessionsResultObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCodeInterpreterSessionsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCodeInterpreterSessionsResultObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageCodeInterpreterSessionsResultObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsResultObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsResultObjectNullable.g.cs new file mode 100644 index 00000000..2ffacd0c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCodeInterpreterSessionsResultObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCodeInterpreterSessionsResultObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCodeInterpreterSessionsResultObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCodeInterpreterSessionsResultObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCodeInterpreterSessionsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCodeInterpreterSessionsResultObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageCodeInterpreterSessionsResultObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsBucketWidth.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsBucketWidth.g.cs new file mode 100644 index 00000000..f514e894 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsBucketWidth.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCompletionsBucketWidthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCompletionsBucketWidth Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCompletionsBucketWidthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCompletionsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCompletionsBucketWidth value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageCompletionsBucketWidthExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsBucketWidthNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsBucketWidthNullable.g.cs new file mode 100644 index 00000000..f2d82c2d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsBucketWidthNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCompletionsBucketWidthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCompletionsBucketWidth? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCompletionsBucketWidthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCompletionsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCompletionsBucketWidth? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageCompletionsBucketWidthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsGroupByItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsGroupByItem.g.cs new file mode 100644 index 00000000..5611d25c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsGroupByItem.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCompletionsGroupByItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCompletionsGroupByItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCompletionsGroupByItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCompletionsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCompletionsGroupByItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageCompletionsGroupByItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsGroupByItemNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsGroupByItemNullable.g.cs new file mode 100644 index 00000000..272faf56 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsGroupByItemNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCompletionsGroupByItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCompletionsGroupByItem? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCompletionsGroupByItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCompletionsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCompletionsGroupByItem? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageCompletionsGroupByItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsResultObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsResultObject.g.cs new file mode 100644 index 00000000..31da8dbf --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsResultObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCompletionsResultObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCompletionsResultObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCompletionsResultObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCompletionsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCompletionsResultObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageCompletionsResultObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsResultObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsResultObjectNullable.g.cs new file mode 100644 index 00000000..6080023f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCompletionsResultObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCompletionsResultObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCompletionsResultObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCompletionsResultObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCompletionsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCompletionsResultObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageCompletionsResultObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCostsBucketWidth.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCostsBucketWidth.g.cs new file mode 100644 index 00000000..8a1a8686 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCostsBucketWidth.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCostsBucketWidthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCostsBucketWidth Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCostsBucketWidthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCostsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCostsBucketWidth value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageCostsBucketWidthExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCostsBucketWidthNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCostsBucketWidthNullable.g.cs new file mode 100644 index 00000000..be14ba73 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCostsBucketWidthNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCostsBucketWidthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCostsBucketWidth? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCostsBucketWidthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCostsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCostsBucketWidth? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageCostsBucketWidthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCostsGroupByItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCostsGroupByItem.g.cs new file mode 100644 index 00000000..1957d25a --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCostsGroupByItem.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCostsGroupByItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCostsGroupByItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCostsGroupByItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCostsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCostsGroupByItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageCostsGroupByItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageCostsGroupByItemNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageCostsGroupByItemNullable.g.cs new file mode 100644 index 00000000..19d5bccd --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageCostsGroupByItemNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageCostsGroupByItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageCostsGroupByItem? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageCostsGroupByItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageCostsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageCostsGroupByItem? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageCostsGroupByItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsBucketWidth.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsBucketWidth.g.cs new file mode 100644 index 00000000..ce1fedc9 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsBucketWidth.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageEmbeddingsBucketWidthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageEmbeddingsBucketWidth Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageEmbeddingsBucketWidthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageEmbeddingsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageEmbeddingsBucketWidth value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageEmbeddingsBucketWidthExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsBucketWidthNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsBucketWidthNullable.g.cs new file mode 100644 index 00000000..e8253849 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsBucketWidthNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageEmbeddingsBucketWidthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageEmbeddingsBucketWidth? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageEmbeddingsBucketWidthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageEmbeddingsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageEmbeddingsBucketWidth? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageEmbeddingsBucketWidthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsGroupByItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsGroupByItem.g.cs new file mode 100644 index 00000000..df10b556 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsGroupByItem.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageEmbeddingsGroupByItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageEmbeddingsGroupByItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageEmbeddingsGroupByItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageEmbeddingsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageEmbeddingsGroupByItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageEmbeddingsGroupByItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsGroupByItemNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsGroupByItemNullable.g.cs new file mode 100644 index 00000000..55a172ae --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsGroupByItemNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageEmbeddingsGroupByItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageEmbeddingsGroupByItem? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageEmbeddingsGroupByItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageEmbeddingsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageEmbeddingsGroupByItem? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageEmbeddingsGroupByItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsResultObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsResultObject.g.cs new file mode 100644 index 00000000..1d04774d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsResultObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageEmbeddingsResultObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageEmbeddingsResultObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageEmbeddingsResultObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageEmbeddingsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageEmbeddingsResultObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageEmbeddingsResultObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsResultObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsResultObjectNullable.g.cs new file mode 100644 index 00000000..bae4db44 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageEmbeddingsResultObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageEmbeddingsResultObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageEmbeddingsResultObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageEmbeddingsResultObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageEmbeddingsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageEmbeddingsResultObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageEmbeddingsResultObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesBucketWidth.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesBucketWidth.g.cs new file mode 100644 index 00000000..e33b6c6d --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesBucketWidth.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesBucketWidthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesBucketWidth Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesBucketWidthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesBucketWidth value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageImagesBucketWidthExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesBucketWidthNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesBucketWidthNullable.g.cs new file mode 100644 index 00000000..ba20378c --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesBucketWidthNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesBucketWidthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesBucketWidth? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesBucketWidthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesBucketWidth? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageImagesBucketWidthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesGroupByItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesGroupByItem.g.cs new file mode 100644 index 00000000..099f0ce0 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesGroupByItem.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesGroupByItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesGroupByItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesGroupByItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesGroupByItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageImagesGroupByItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesGroupByItemNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesGroupByItemNullable.g.cs new file mode 100644 index 00000000..5367d853 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesGroupByItemNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesGroupByItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesGroupByItem? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesGroupByItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesGroupByItem? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageImagesGroupByItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesResultObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesResultObject.g.cs new file mode 100644 index 00000000..d44555a4 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesResultObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesResultObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesResultObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesResultObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesResultObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageImagesResultObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesResultObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesResultObjectNullable.g.cs new file mode 100644 index 00000000..71084c10 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesResultObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesResultObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesResultObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesResultObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesResultObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageImagesResultObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSize.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSize.g.cs new file mode 100644 index 00000000..c939ef95 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSize.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesSizeJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesSize Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesSizeExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesSize)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesSize value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageImagesSizeExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSizeNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSizeNullable.g.cs new file mode 100644 index 00000000..52b056ab --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSizeNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesSizeNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesSize? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesSizeExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesSize)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesSize? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageImagesSizeExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSource.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSource.g.cs new file mode 100644 index 00000000..c2a8218f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSource.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesSourceJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesSource Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesSourceExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesSource)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesSource value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageImagesSourceExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSourceNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSourceNullable.g.cs new file mode 100644 index 00000000..de8f8f9b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageImagesSourceNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageImagesSourceNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageImagesSource? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageImagesSourceExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageImagesSource)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageImagesSource? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageImagesSourceExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsBucketWidth.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsBucketWidth.g.cs new file mode 100644 index 00000000..be117735 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsBucketWidth.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageModerationsBucketWidthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageModerationsBucketWidth Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageModerationsBucketWidthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageModerationsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageModerationsBucketWidth value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageModerationsBucketWidthExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsBucketWidthNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsBucketWidthNullable.g.cs new file mode 100644 index 00000000..9c20f1eb --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsBucketWidthNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageModerationsBucketWidthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageModerationsBucketWidth? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageModerationsBucketWidthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageModerationsBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageModerationsBucketWidth? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageModerationsBucketWidthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsGroupByItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsGroupByItem.g.cs new file mode 100644 index 00000000..67fce680 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsGroupByItem.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageModerationsGroupByItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageModerationsGroupByItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageModerationsGroupByItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageModerationsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageModerationsGroupByItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageModerationsGroupByItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsGroupByItemNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsGroupByItemNullable.g.cs new file mode 100644 index 00000000..77f2951b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsGroupByItemNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageModerationsGroupByItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageModerationsGroupByItem? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageModerationsGroupByItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageModerationsGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageModerationsGroupByItem? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageModerationsGroupByItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsResultObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsResultObject.g.cs new file mode 100644 index 00000000..cde048fa --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsResultObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageModerationsResultObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageModerationsResultObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageModerationsResultObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageModerationsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageModerationsResultObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageModerationsResultObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsResultObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsResultObjectNullable.g.cs new file mode 100644 index 00000000..bd4cd705 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageModerationsResultObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageModerationsResultObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageModerationsResultObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageModerationsResultObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageModerationsResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageModerationsResultObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageModerationsResultObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageResponseObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageResponseObject.g.cs new file mode 100644 index 00000000..7e6a7ef2 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageResponseObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageResponseObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageResponseObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageResponseObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageResponseObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageResponseObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageResponseObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageResponseObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageResponseObjectNullable.g.cs new file mode 100644 index 00000000..09bf4040 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageResponseObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageResponseObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageResponseObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageResponseObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageResponseObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageResponseObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageResponseObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketObject.g.cs new file mode 100644 index 00000000..1b128294 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageTimeBucketObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageTimeBucketObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageTimeBucketObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageTimeBucketObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageTimeBucketObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageTimeBucketObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketObjectNullable.g.cs new file mode 100644 index 00000000..37e0b96a --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageTimeBucketObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageTimeBucketObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageTimeBucketObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageTimeBucketObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageTimeBucketObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageTimeBucketObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketResultItemDiscriminatorObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketResultItemDiscriminatorObject.g.cs new file mode 100644 index 00000000..114a45f3 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketResultItemDiscriminatorObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageTimeBucketResultItemDiscriminatorObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageTimeBucketResultItemDiscriminatorObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageTimeBucketResultItemDiscriminatorObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketResultItemDiscriminatorObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketResultItemDiscriminatorObjectNullable.g.cs new file mode 100644 index 00000000..5a72a84f --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageTimeBucketResultItemDiscriminatorObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageTimeBucketResultItemDiscriminatorObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageTimeBucketResultItemDiscriminatorObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageTimeBucketResultItemDiscriminatorObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresBucketWidth.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresBucketWidth.g.cs new file mode 100644 index 00000000..87166a9a --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresBucketWidth.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageVectorStoresBucketWidthJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageVectorStoresBucketWidth Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageVectorStoresBucketWidthExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageVectorStoresBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageVectorStoresBucketWidth value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageVectorStoresBucketWidthExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresBucketWidthNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresBucketWidthNullable.g.cs new file mode 100644 index 00000000..d80684e5 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresBucketWidthNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageVectorStoresBucketWidthNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageVectorStoresBucketWidth? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageVectorStoresBucketWidthExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageVectorStoresBucketWidth)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageVectorStoresBucketWidth? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageVectorStoresBucketWidthExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresGroupByItem.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresGroupByItem.g.cs new file mode 100644 index 00000000..2090db8b --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresGroupByItem.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageVectorStoresGroupByItemJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageVectorStoresGroupByItem Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageVectorStoresGroupByItemExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageVectorStoresGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageVectorStoresGroupByItem value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageVectorStoresGroupByItemExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresGroupByItemNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresGroupByItemNullable.g.cs new file mode 100644 index 00000000..f76cfc5e --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresGroupByItemNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageVectorStoresGroupByItemNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageVectorStoresGroupByItem? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageVectorStoresGroupByItemExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageVectorStoresGroupByItem)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageVectorStoresGroupByItem? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageVectorStoresGroupByItemExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresResultObject.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresResultObject.g.cs new file mode 100644 index 00000000..80487939 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresResultObject.g.cs @@ -0,0 +1,49 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageVectorStoresResultObjectJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageVectorStoresResultObject Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageVectorStoresResultObjectExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageVectorStoresResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageVectorStoresResultObject value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::OpenAI.UsageVectorStoresResultObjectExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresResultObjectNullable.g.cs b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresResultObjectNullable.g.cs new file mode 100644 index 00000000..b3adec98 --- /dev/null +++ b/src/libs/OpenAI/Generated/JsonConverters.UsageVectorStoresResultObjectNullable.g.cs @@ -0,0 +1,56 @@ +#nullable enable + +namespace OpenAI.JsonConverters +{ + /// + public sealed class UsageVectorStoresResultObjectNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::OpenAI.UsageVectorStoresResultObject? Read( + ref global::System.Text.Json.Utf8JsonReader reader, + global::System.Type typeToConvert, + global::System.Text.Json.JsonSerializerOptions options) + { + switch (reader.TokenType) + { + case global::System.Text.Json.JsonTokenType.String: + { + var stringValue = reader.GetString(); + if (stringValue != null) + { + return global::OpenAI.UsageVectorStoresResultObjectExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::OpenAI.UsageVectorStoresResultObject)numValue; + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::OpenAI.UsageVectorStoresResultObject? value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + if (value == null) + { + writer.WriteNullValue(); + } + else + { + writer.WriteStringValue(global::OpenAI.UsageVectorStoresResultObjectExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs b/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs index 4a4a0cb9..8bfb9f9c 100644 --- a/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs +++ b/src/libs/OpenAI/Generated/JsonSerializerContext.g.cs @@ -285,6 +285,8 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.StaticChunkingStrategyRequestParamTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ChunkingStrategyRequestParamDiscriminatorTypeJsonConverter), typeof(global::OpenAI.JsonConverters.ChunkingStrategyRequestParamDiscriminatorTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.CostsResultObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.CostsResultObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateAssistantRequestModelJsonConverter), typeof(global::OpenAI.JsonConverters.CreateAssistantRequestModelNullableJsonConverter), typeof(global::OpenAI.JsonConverters.CreateAssistantRequestToolDiscriminatorTypeJsonConverter), @@ -565,6 +567,8 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.ProjectUserDeleteResponseObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ProjectUserUpdateRequestRoleJsonConverter), typeof(global::OpenAI.JsonConverters.ProjectUserUpdateRequestRoleNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventConversationItemCreateTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventConversationItemCreateTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeConversationItemObjectJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeConversationItemObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeConversationItemTypeJsonConverter), @@ -575,10 +579,20 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.RealtimeConversationItemRoleNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeConversationItemContentItemTypeJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeConversationItemContentItemTypeNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RealtimeResponseObjectJsonConverter), - typeof(global::OpenAI.JsonConverters.RealtimeResponseObjectNullableJsonConverter), - typeof(global::OpenAI.JsonConverters.RealtimeResponseStatusJsonConverter), - typeof(global::OpenAI.JsonConverters.RealtimeResponseStatusNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventConversationItemDeleteTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventConversationItemDeleteTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventConversationItemTruncateTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventConversationItemTruncateTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferAppendTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferAppendTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferClearTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferClearTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferCommitTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferCommitTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventResponseCancelTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventResponseCancelTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventResponseCreateTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventResponseCreateTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeSessionObjectJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeSessionObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeSessionVoiceJsonConverter), @@ -591,12 +605,98 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.RealtimeSessionToolChoiceNullableJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeSessionMaxOutputTokensJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeSessionMaxOutputTokensNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventSessionUpdateTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeClientEventSessionUpdateTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeResponseObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeResponseObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeResponseStatusJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeResponseStatusNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationCreatedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationCreatedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemCreatedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemCreatedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemDeletedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemDeletedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemTruncatedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemTruncatedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventErrorTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventErrorTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferClearedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferClearedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioDeltaTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioDeltaTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioDoneTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioDoneTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDoneTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDoneTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseCreatedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseCreatedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseDoneTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseDoneTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemAddedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemAddedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemDoneTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemDoneTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseTextDeltaTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseTextDeltaTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseTextDoneTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseTextDoneTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventSessionCreatedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventSessionCreatedTypeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventSessionUpdatedTypeJsonConverter), + typeof(global::OpenAI.JsonConverters.RealtimeServerEventSessionUpdatedTypeNullableJsonConverter), typeof(global::OpenAI.JsonConverters.UploadStatusJsonConverter), typeof(global::OpenAI.JsonConverters.UploadStatusNullableJsonConverter), typeof(global::OpenAI.JsonConverters.UploadObjectJsonConverter), typeof(global::OpenAI.JsonConverters.UploadObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.UploadPartObjectJsonConverter), typeof(global::OpenAI.JsonConverters.UploadPartObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioSpeechesResultObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioSpeechesResultObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioTranscriptionsResultObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioTranscriptionsResultObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCodeInterpreterSessionsResultObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCodeInterpreterSessionsResultObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCompletionsResultObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCompletionsResultObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageEmbeddingsResultObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageEmbeddingsResultObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesResultObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesResultObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageModerationsResultObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageModerationsResultObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageResponseObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageResponseObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageTimeBucketObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageTimeBucketObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageVectorStoresResultObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageVectorStoresResultObjectNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageTimeBucketResultItemDiscriminatorObjectJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageTimeBucketResultItemDiscriminatorObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.UserObjectJsonConverter), typeof(global::OpenAI.JsonConverters.UserObjectNullableJsonConverter), typeof(global::OpenAI.JsonConverters.UserRoleJsonConverter), @@ -711,6 +811,46 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.ListAssistantsOrderNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ListFilesOrderJsonConverter), typeof(global::OpenAI.JsonConverters.ListFilesOrderNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCostsBucketWidthJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCostsBucketWidthNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCostsGroupByItemJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCostsGroupByItemNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioSpeechesBucketWidthJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioSpeechesBucketWidthNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioSpeechesGroupByItemJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioSpeechesGroupByItemNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioTranscriptionsBucketWidthJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioTranscriptionsBucketWidthNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioTranscriptionsGroupByItemJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageAudioTranscriptionsGroupByItemNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCodeInterpreterSessionsBucketWidthJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCodeInterpreterSessionsBucketWidthNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCodeInterpreterSessionsGroupByItemJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCodeInterpreterSessionsGroupByItemNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCompletionsBucketWidthJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCompletionsBucketWidthNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCompletionsGroupByItemJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageCompletionsGroupByItemNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageEmbeddingsBucketWidthJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageEmbeddingsBucketWidthNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageEmbeddingsGroupByItemJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageEmbeddingsGroupByItemNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesBucketWidthJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesBucketWidthNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesSourceJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesSourceNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesSizeJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesSizeNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesGroupByItemJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageImagesGroupByItemNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageModerationsBucketWidthJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageModerationsBucketWidthNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageModerationsGroupByItemJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageModerationsGroupByItemNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageVectorStoresBucketWidthJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageVectorStoresBucketWidthNullableJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageVectorStoresGroupByItemJsonConverter), + typeof(global::OpenAI.JsonConverters.UsageVectorStoresGroupByItemNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ListMessagesOrderJsonConverter), typeof(global::OpenAI.JsonConverters.ListMessagesOrderNullableJsonConverter), typeof(global::OpenAI.JsonConverters.ListRunsOrderJsonConverter), @@ -769,6 +909,7 @@ namespace OpenAI typeof(global::OpenAI.JsonConverters.FineTuneChatCompletionRequestAssistantMessageJsonConverter), typeof(global::OpenAI.JsonConverters.VectorStoreFileObjectChunkingStrategyJsonConverter), typeof(global::OpenAI.JsonConverters.ToolsItem7JsonConverter), + typeof(global::OpenAI.JsonConverters.ResultItemJsonConverter), typeof(global::OpenAI.JsonConverters.RealtimeServerEventJsonConverter), typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>), typeof(global::OpenAI.JsonConverters.OneOfJsonConverter>), diff --git a/src/libs/OpenAI/Generated/JsonSerializerContextTypes.g.cs b/src/libs/OpenAI/Generated/JsonSerializerContextTypes.g.cs index 19f7e615..d9ccb0d8 100644 --- a/src/libs/OpenAI/Generated/JsonSerializerContextTypes.g.cs +++ b/src/libs/OpenAI/Generated/JsonSerializerContextTypes.g.cs @@ -1674,2510 +1674,2898 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::OpenAI.CreateAssistantRequest? Type414 { get; set; } + public global::OpenAI.CostsResult? Type414 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type415 { get; set; } + public global::OpenAI.CostsResultObject? Type415 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestModel? Type416 { get; set; } + public global::OpenAI.CostsResultAmount? Type416 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type417 { get; set; } + public global::OpenAI.CreateAssistantRequest? Type417 { get; set; } /// /// /// - public global::OpenAI.ToolsItem2? Type418 { get; set; } + public global::OpenAI.AnyOf? Type418 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolDiscriminator? Type419 { get; set; } + public global::OpenAI.CreateAssistantRequestModel? Type419 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolDiscriminatorType? Type420 { get; set; } + public global::System.Collections.Generic.IList? Type420 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResources? Type421 { get; set; } + public global::OpenAI.ToolsItem2? Type421 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? Type422 { get; set; } + public global::OpenAI.CreateAssistantRequestToolDiscriminator? Type422 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearch? Type423 { get; set; } + public global::OpenAI.CreateAssistantRequestToolDiscriminatorType? Type423 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type424 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResources? Type424 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStore? Type425 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesCodeInterpreter? Type425 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? Type426 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearch? Type426 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type427 { get; set; } + public global::System.Collections.Generic.IList? Type427 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type428 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStore? Type428 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type429 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategy? Type429 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type430 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type430 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type431 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type431 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? Type432 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type432 { get; set; } /// /// /// - public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type433 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type433 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionFunctionResponse? Type434 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type434 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type435 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? Type435 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionFunctionResponseChoice? Type436 { get; set; } + public global::OpenAI.CreateAssistantRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type436 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionFunctionResponseChoiceFinishReason? Type437 { get; set; } + public global::OpenAI.CreateChatCompletionFunctionResponse? Type437 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionFunctionResponseObject? Type438 { get; set; } + public global::System.Collections.Generic.IList? Type438 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequest? Type439 { get; set; } + public global::OpenAI.CreateChatCompletionFunctionResponseChoice? Type439 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type440 { get; set; } + public global::OpenAI.CreateChatCompletionFunctionResponseChoiceFinishReason? Type440 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type441 { get; set; } + public global::OpenAI.CreateChatCompletionFunctionResponseObject? Type441 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestModel? Type442 { get; set; } + public global::OpenAI.CreateChatCompletionRequest? Type442 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type443 { get; set; } + public global::System.Collections.Generic.IList? Type443 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type444 { get; set; } + public global::OpenAI.AnyOf? Type444 { get; set; } /// /// /// - public global::OpenAI.PredictionContent? Type445 { get; set; } + public global::OpenAI.CreateChatCompletionRequestModel? Type445 { get; set; } /// /// /// - public global::OpenAI.PredictionContentType? Type446 { get; set; } + public global::System.Collections.Generic.Dictionary? Type446 { get; set; } /// /// /// - public global::OpenAI.OneOf>? Type447 { get; set; } + public global::System.Collections.Generic.Dictionary? Type447 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type448 { get; set; } + public global::OpenAI.PredictionContent? Type448 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestAudio? Type449 { get; set; } + public global::OpenAI.PredictionContentType? Type449 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestAudioVoice? Type450 { get; set; } + public global::OpenAI.OneOf>? Type450 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestAudioFormat? Type451 { get; set; } + public global::System.Collections.Generic.IList? Type451 { get; set; } /// /// /// - public global::OpenAI.ResponseFormat? Type452 { get; set; } + public global::OpenAI.CreateChatCompletionRequestAudio? Type452 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminator? Type453 { get; set; } + public global::OpenAI.CreateChatCompletionRequestAudioVoice? Type453 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType? Type454 { get; set; } + public global::OpenAI.CreateChatCompletionRequestAudioFormat? Type454 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestServiceTier? Type455 { get; set; } + public global::OpenAI.ResponseFormat? Type455 { get; set; } /// /// /// - public global::OpenAI.OneOf>? Type456 { get; set; } + public global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminator? Type456 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type457 { get; set; } + public global::OpenAI.CreateChatCompletionRequestResponseFormatDiscriminatorType? Type457 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type458 { get; set; } + public global::OpenAI.CreateChatCompletionRequestServiceTier? Type458 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionRequestFunctionCall? Type459 { get; set; } + public global::OpenAI.OneOf>? Type459 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type460 { get; set; } + public global::System.Collections.Generic.IList? Type460 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponse? Type461 { get; set; } + public global::OpenAI.OneOf? Type461 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type462 { get; set; } + public global::OpenAI.CreateChatCompletionRequestFunctionCall? Type462 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseChoice? Type463 { get; set; } + public global::System.Collections.Generic.IList? Type463 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseChoiceFinishReason? Type464 { get; set; } + public global::OpenAI.CreateChatCompletionResponse? Type464 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseChoiceLogprobs? Type465 { get; set; } + public global::System.Collections.Generic.IList? Type465 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type466 { get; set; } + public global::OpenAI.CreateChatCompletionResponseChoice? Type466 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseServiceTier? Type467 { get; set; } + public global::OpenAI.CreateChatCompletionResponseChoiceFinishReason? Type467 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionResponseObject? Type468 { get; set; } + public global::OpenAI.CreateChatCompletionResponseChoiceLogprobs? Type468 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponse? Type469 { get; set; } + public global::System.Collections.Generic.IList? Type469 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type470 { get; set; } + public global::OpenAI.CreateChatCompletionResponseServiceTier? Type470 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseChoice? Type471 { get; set; } + public global::OpenAI.CreateChatCompletionResponseObject? Type471 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseChoiceLogprobs? Type472 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponse? Type472 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseChoiceFinishReason? Type473 { get; set; } + public global::System.Collections.Generic.IList? Type473 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseServiceTier? Type474 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseChoice? Type474 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseObject? Type475 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseChoiceLogprobs? Type475 { get; set; } /// /// /// - public global::OpenAI.CreateChatCompletionStreamResponseUsage? Type476 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseChoiceFinishReason? Type476 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionRequest? Type477 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseServiceTier? Type477 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type478 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseObject? Type478 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionRequestModel? Type479 { get; set; } + public global::OpenAI.CreateChatCompletionStreamResponseUsage? Type479 { get; set; } /// /// /// - public global::OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? Type480 { get; set; } + public global::OpenAI.CreateCompletionRequest? Type480 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type481 { get; set; } + public global::OpenAI.AnyOf? Type481 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponse? Type482 { get; set; } + public global::OpenAI.CreateCompletionRequestModel? Type482 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type483 { get; set; } + public global::OpenAI.OneOf, global::System.Collections.Generic.IList, global::System.Collections.Generic.IList>>? Type483 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponseChoice? Type484 { get; set; } + public global::System.Collections.Generic.IList>? Type484 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponseChoiceFinishReason? Type485 { get; set; } + public global::OpenAI.CreateCompletionResponse? Type485 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponseChoiceLogprobs? Type486 { get; set; } + public global::System.Collections.Generic.IList? Type486 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type487 { get; set; } + public global::OpenAI.CreateCompletionResponseChoice? Type487 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type488 { get; set; } + public global::OpenAI.CreateCompletionResponseChoiceFinishReason? Type488 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type489 { get; set; } + public global::OpenAI.CreateCompletionResponseChoiceLogprobs? Type489 { get; set; } /// /// /// - public global::OpenAI.CreateCompletionResponseObject? Type490 { get; set; } + public global::System.Collections.Generic.IList? Type490 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingRequest? Type491 { get; set; } + public global::System.Collections.Generic.IList>? Type491 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type492 { get; set; } + public global::System.Collections.Generic.Dictionary? Type492 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingRequestModel? Type493 { get; set; } + public global::OpenAI.CreateCompletionResponseObject? Type493 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingRequestEncodingFormat? Type494 { get; set; } + public global::OpenAI.CreateEmbeddingRequest? Type494 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingResponse? Type495 { get; set; } + public global::OpenAI.AnyOf? Type495 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type496 { get; set; } + public global::OpenAI.CreateEmbeddingRequestModel? Type496 { get; set; } /// /// /// - public global::OpenAI.Embedding? Type497 { get; set; } + public global::OpenAI.CreateEmbeddingRequestEncodingFormat? Type497 { get; set; } /// /// /// - public global::OpenAI.EmbeddingObject? Type498 { get; set; } + public global::OpenAI.CreateEmbeddingResponse? Type498 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingResponseObject? Type499 { get; set; } + public global::System.Collections.Generic.IList? Type499 { get; set; } /// /// /// - public global::OpenAI.CreateEmbeddingResponseUsage? Type500 { get; set; } + public global::OpenAI.Embedding? Type500 { get; set; } /// /// /// - public global::OpenAI.CreateFileRequest? Type501 { get; set; } + public global::OpenAI.EmbeddingObject? Type501 { get; set; } /// /// /// - public global::OpenAI.CreateFileRequestPurpose? Type502 { get; set; } + public global::OpenAI.CreateEmbeddingResponseObject? Type502 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequest? Type503 { get; set; } + public global::OpenAI.CreateEmbeddingResponseUsage? Type503 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type504 { get; set; } + public global::OpenAI.CreateFileRequest? Type504 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestModel? Type505 { get; set; } + public global::OpenAI.CreateFileRequestPurpose? Type505 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestHyperparameters? Type506 { get; set; } + public global::OpenAI.CreateFineTuningJobRequest? Type506 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type507 { get; set; } + public global::OpenAI.AnyOf? Type507 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestHyperparametersBatchSize? Type508 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestModel? Type508 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type509 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestHyperparameters? Type509 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplier? Type510 { get; set; } + public global::OpenAI.OneOf? Type510 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type511 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestHyperparametersBatchSize? Type511 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestHyperparametersNEpochs? Type512 { get; set; } + public global::OpenAI.OneOf? Type512 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type513 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestHyperparametersLearningRateMultiplier? Type513 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestIntegration? Type514 { get; set; } + public global::OpenAI.OneOf? Type514 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestIntegrationType? Type515 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestHyperparametersNEpochs? Type515 { get; set; } /// /// /// - public global::OpenAI.CreateFineTuningJobRequestIntegrationWandb? Type516 { get; set; } + public global::System.Collections.Generic.IList? Type516 { get; set; } /// /// /// - public global::OpenAI.CreateImageEditRequest? Type517 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestIntegration? Type517 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type518 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestIntegrationType? Type518 { get; set; } /// /// /// - public global::OpenAI.CreateImageEditRequestModel? Type519 { get; set; } + public global::OpenAI.CreateFineTuningJobRequestIntegrationWandb? Type519 { get; set; } /// /// /// - public global::OpenAI.CreateImageEditRequestSize? Type520 { get; set; } + public global::OpenAI.CreateImageEditRequest? Type520 { get; set; } /// /// /// - public global::OpenAI.CreateImageEditRequestResponseFormat? Type521 { get; set; } + public global::OpenAI.AnyOf? Type521 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequest? Type522 { get; set; } + public global::OpenAI.CreateImageEditRequestModel? Type522 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type523 { get; set; } + public global::OpenAI.CreateImageEditRequestSize? Type523 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestModel? Type524 { get; set; } + public global::OpenAI.CreateImageEditRequestResponseFormat? Type524 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestQuality? Type525 { get; set; } + public global::OpenAI.CreateImageRequest? Type525 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestResponseFormat? Type526 { get; set; } + public global::OpenAI.AnyOf? Type526 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestSize? Type527 { get; set; } + public global::OpenAI.CreateImageRequestModel? Type527 { get; set; } /// /// /// - public global::OpenAI.CreateImageRequestStyle? Type528 { get; set; } + public global::OpenAI.CreateImageRequestQuality? Type528 { get; set; } /// /// /// - public global::OpenAI.CreateImageVariationRequest? Type529 { get; set; } + public global::OpenAI.CreateImageRequestResponseFormat? Type529 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type530 { get; set; } + public global::OpenAI.CreateImageRequestSize? Type530 { get; set; } /// /// /// - public global::OpenAI.CreateImageVariationRequestModel? Type531 { get; set; } + public global::OpenAI.CreateImageRequestStyle? Type531 { get; set; } /// /// /// - public global::OpenAI.CreateImageVariationRequestResponseFormat? Type532 { get; set; } + public global::OpenAI.CreateImageVariationRequest? Type532 { get; set; } /// /// /// - public global::OpenAI.CreateImageVariationRequestSize? Type533 { get; set; } + public global::OpenAI.AnyOf? Type533 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequest? Type534 { get; set; } + public global::OpenAI.CreateImageVariationRequestModel? Type534 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequestRole? Type535 { get; set; } + public global::OpenAI.CreateImageVariationRequestResponseFormat? Type535 { get; set; } /// /// /// - public global::OpenAI.OneOf>? Type536 { get; set; } + public global::OpenAI.CreateImageVariationRequestSize? Type536 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type537 { get; set; } + public global::OpenAI.CreateMessageRequest? Type537 { get; set; } /// /// /// - public global::OpenAI.ContentVariant2Item? Type538 { get; set; } + public global::OpenAI.CreateMessageRequestRole? Type538 { get; set; } /// /// /// - public global::OpenAI.MessageRequestContentTextObject? Type539 { get; set; } + public global::OpenAI.OneOf>? Type539 { get; set; } /// /// /// - public global::OpenAI.MessageRequestContentTextObjectType? Type540 { get; set; } + public global::System.Collections.Generic.IList? Type540 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator? Type541 { get; set; } + public global::OpenAI.ContentVariant2Item? Type541 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType? Type542 { get; set; } + public global::OpenAI.MessageRequestContentTextObject? Type542 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type543 { get; set; } + public global::OpenAI.MessageRequestContentTextObjectType? Type543 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequestAttachment? Type544 { get; set; } + public global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminator? Type544 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type545 { get; set; } + public global::OpenAI.CreateMessageRequestContentVariant2ItemDiscriminatorType? Type545 { get; set; } /// /// /// - public global::OpenAI.ToolsItem3? Type546 { get; set; } + public global::System.Collections.Generic.IList? Type546 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequestAttachmentToolDiscriminator? Type547 { get; set; } + public global::OpenAI.CreateMessageRequestAttachment? Type547 { get; set; } /// /// /// - public global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType? Type548 { get; set; } + public global::System.Collections.Generic.IList? Type548 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequest? Type549 { get; set; } + public global::OpenAI.ToolsItem3? Type549 { get; set; } /// /// /// - public global::OpenAI.OneOf, global::System.Collections.Generic.IList>? Type550 { get; set; } + public global::OpenAI.CreateMessageRequestAttachmentToolDiscriminator? Type550 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type551 { get; set; } + public global::OpenAI.CreateMessageRequestAttachmentToolDiscriminatorType? Type551 { get; set; } /// /// /// - public global::OpenAI.InputVariant3Item? Type552 { get; set; } + public global::OpenAI.CreateModerationRequest? Type552 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1? Type553 { get; set; } + public global::OpenAI.OneOf, global::System.Collections.Generic.IList>? Type553 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type? Type554 { get; set; } + public global::System.Collections.Generic.IList? Type554 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl? Type555 { get; set; } + public global::OpenAI.InputVariant3Item? Type555 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2? Type556 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1? Type556 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type? Type557 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1Type? Type557 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator? Type558 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant1ImageUrl? Type558 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType? Type559 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2? Type559 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type560 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemVariant2Type? Type560 { get; set; } /// /// /// - public global::OpenAI.CreateModerationRequestModel? Type561 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminator? Type561 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponse? Type562 { get; set; } + public global::OpenAI.CreateModerationRequestInputVariant3ItemDiscriminatorType? Type562 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type563 { get; set; } + public global::OpenAI.AnyOf? Type563 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResult? Type564 { get; set; } + public global::OpenAI.CreateModerationRequestModel? Type564 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategories? Type565 { get; set; } + public global::OpenAI.CreateModerationResponse? Type565 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryScores? Type566 { get; set; } + public global::System.Collections.Generic.IList? Type566 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes? Type567 { get; set; } + public global::OpenAI.CreateModerationResponseResult? Type567 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type568 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategories? Type568 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateItem? Type569 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryScores? Type569 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type570 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypes? Type570 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateThreateningItem? Type571 { get; set; } + public global::System.Collections.Generic.IList? Type571 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type572 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateItem? Type572 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem? Type573 { get; set; } + public global::System.Collections.Generic.IList? Type573 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type574 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHateThreateningItem? Type574 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem? Type575 { get; set; } + public global::System.Collections.Generic.IList? Type575 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type576 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentItem? Type576 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitItem? Type577 { get; set; } + public global::System.Collections.Generic.IList? Type577 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type578 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesHarassmentThreateningItem? Type578 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitViolentItem? Type579 { get; set; } + public global::System.Collections.Generic.IList? Type579 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type580 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitItem? Type580 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmItem? Type581 { get; set; } + public global::System.Collections.Generic.IList? Type581 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type582 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesIllicitViolentItem? Type582 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmIntentItem? Type583 { get; set; } + public global::System.Collections.Generic.IList? Type583 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type584 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmItem? Type584 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstruction? Type585 { get; set; } + public global::System.Collections.Generic.IList? Type585 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type586 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmIntentItem? Type586 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualItem? Type587 { get; set; } + public global::System.Collections.Generic.IList? Type587 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type588 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSelfHarmInstruction? Type588 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualMinor? Type589 { get; set; } + public global::System.Collections.Generic.IList? Type589 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type590 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualItem? Type590 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceItem? Type591 { get; set; } + public global::System.Collections.Generic.IList? Type591 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type592 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesSexualMinor? Type592 { get; set; } /// /// /// - public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceGraphicItem? Type593 { get; set; } + public global::System.Collections.Generic.IList? Type593 { get; set; } /// /// /// - public global::OpenAI.CreateRunRequest? Type594 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceItem? Type594 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type595 { get; set; } + public global::System.Collections.Generic.IList? Type595 { get; set; } /// /// /// - public global::OpenAI.CreateRunRequestModel? Type596 { get; set; } + public global::OpenAI.CreateModerationResponseResultCategoryAppliedInputTypesViolenceGraphicItem? Type596 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type597 { get; set; } + public global::OpenAI.CreateRunRequest? Type597 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type598 { get; set; } + public global::OpenAI.AnyOf? Type598 { get; set; } /// /// /// - public global::OpenAI.ToolsItem4? Type599 { get; set; } + public global::OpenAI.CreateRunRequestModel? Type599 { get; set; } /// /// /// - public global::OpenAI.CreateRunRequestToolDiscriminator? Type600 { get; set; } + public global::System.Collections.Generic.IList? Type600 { get; set; } /// /// /// - public global::OpenAI.CreateRunRequestToolDiscriminatorType? Type601 { get; set; } + public global::System.Collections.Generic.IList? Type601 { get; set; } /// /// /// - public global::OpenAI.CreateSpeechRequest? Type602 { get; set; } + public global::OpenAI.ToolsItem4? Type602 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type603 { get; set; } + public global::OpenAI.CreateRunRequestToolDiscriminator? Type603 { get; set; } /// /// /// - public global::OpenAI.CreateSpeechRequestModel? Type604 { get; set; } + public global::OpenAI.CreateRunRequestToolDiscriminatorType? Type604 { get; set; } /// /// /// - public global::OpenAI.CreateSpeechRequestVoice? Type605 { get; set; } + public global::OpenAI.CreateSpeechRequest? Type605 { get; set; } /// /// /// - public global::OpenAI.CreateSpeechRequestResponseFormat? Type606 { get; set; } + public global::OpenAI.AnyOf? Type606 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequest? Type607 { get; set; } + public global::OpenAI.CreateSpeechRequestModel? Type607 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequest? Type608 { get; set; } + public global::OpenAI.CreateSpeechRequestVoice? Type608 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResources? Type609 { get; set; } + public global::OpenAI.CreateSpeechRequestResponseFormat? Type609 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? Type610 { get; set; } + public global::OpenAI.CreateThreadAndRunRequest? Type610 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearch? Type611 { get; set; } + public global::OpenAI.CreateThreadRequest? Type611 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type612 { get; set; } + public global::OpenAI.CreateThreadRequestToolResources? Type612 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStore? Type613 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesCodeInterpreter? Type613 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? Type614 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearch? Type614 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type615 { get; set; } + public global::System.Collections.Generic.IList? Type615 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type616 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStore? Type616 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type617 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategy? Type617 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type618 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1? Type618 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type619 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant1Type? Type619 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? Type620 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2? Type620 { get; set; } /// /// /// - public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type621 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Type? Type621 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type622 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyVariant2Static? Type622 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestModel? Type623 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminator? Type623 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type624 { get; set; } + public global::OpenAI.CreateThreadRequestToolResourcesFileSearchVectorStoreChunkingStrategyDiscriminatorType? Type624 { get; set; } /// /// /// - public global::OpenAI.ToolsItem5? Type625 { get; set; } + public global::OpenAI.AnyOf? Type625 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestToolDiscriminator? Type626 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestModel? Type626 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType? Type627 { get; set; } + public global::System.Collections.Generic.IList? Type627 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestToolResources? Type628 { get; set; } + public global::OpenAI.ToolsItem5? Type628 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestToolResourcesCodeInterpreter? Type629 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolDiscriminator? Type629 { get; set; } /// /// /// - public global::OpenAI.CreateThreadAndRunRequestToolResourcesFileSearch? Type630 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolDiscriminatorType? Type630 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionRequest? Type631 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolResources? Type631 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type632 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolResourcesCodeInterpreter? Type632 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionRequestModel? Type633 { get; set; } + public global::OpenAI.CreateThreadAndRunRequestToolResourcesFileSearch? Type633 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type634 { get; set; } + public global::OpenAI.CreateTranscriptionRequest? Type634 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionRequestTimestampGranularitie? Type635 { get; set; } + public global::OpenAI.AnyOf? Type635 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionResponseJson? Type636 { get; set; } + public global::OpenAI.CreateTranscriptionRequestModel? Type636 { get; set; } /// /// /// - public global::OpenAI.CreateTranscriptionResponseVerboseJson? Type637 { get; set; } + public global::System.Collections.Generic.IList? Type637 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type638 { get; set; } + public global::OpenAI.CreateTranscriptionRequestTimestampGranularitie? Type638 { get; set; } /// /// /// - public global::OpenAI.TranscriptionWord? Type639 { get; set; } + public global::OpenAI.CreateTranscriptionResponseJson? Type639 { get; set; } /// /// /// - public float? Type640 { get; set; } + public global::OpenAI.CreateTranscriptionResponseVerboseJson? Type640 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type641 { get; set; } + public global::System.Collections.Generic.IList? Type641 { get; set; } /// /// /// - public global::OpenAI.TranscriptionSegment? Type642 { get; set; } + public global::OpenAI.TranscriptionWord? Type642 { get; set; } /// /// /// - public global::OpenAI.CreateTranslationRequest? Type643 { get; set; } + public float? Type643 { get; set; } /// /// /// - public global::OpenAI.AnyOf? Type644 { get; set; } + public global::System.Collections.Generic.IList? Type644 { get; set; } /// /// /// - public global::OpenAI.CreateTranslationRequestModel? Type645 { get; set; } + public global::OpenAI.TranscriptionSegment? Type645 { get; set; } /// /// /// - public global::OpenAI.CreateTranslationResponseJson? Type646 { get; set; } + public global::OpenAI.CreateTranslationRequest? Type646 { get; set; } /// /// /// - public global::OpenAI.CreateTranslationResponseVerboseJson? Type647 { get; set; } + public global::OpenAI.AnyOf? Type647 { get; set; } /// /// /// - public global::OpenAI.CreateUploadRequest? Type648 { get; set; } + public global::OpenAI.CreateTranslationRequestModel? Type648 { get; set; } /// /// /// - public global::OpenAI.CreateUploadRequestPurpose? Type649 { get; set; } + public global::OpenAI.CreateTranslationResponseJson? Type649 { get; set; } /// /// /// - public global::OpenAI.CreateVectorStoreFileBatchRequest? Type650 { get; set; } + public global::OpenAI.CreateTranslationResponseVerboseJson? Type650 { get; set; } /// /// /// - public global::OpenAI.CreateVectorStoreFileRequest? Type651 { get; set; } + public global::OpenAI.CreateUploadRequest? Type651 { get; set; } /// /// /// - public global::OpenAI.CreateVectorStoreRequest? Type652 { get; set; } + public global::OpenAI.CreateUploadRequestPurpose? Type652 { get; set; } /// /// /// - public global::OpenAI.VectorStoreExpirationAfter? Type653 { get; set; } + public global::OpenAI.CreateVectorStoreFileBatchRequest? Type653 { get; set; } /// /// /// - public global::OpenAI.VectorStoreExpirationAfterAnchor? Type654 { get; set; } + public global::OpenAI.CreateVectorStoreFileRequest? Type654 { get; set; } /// /// /// - public global::OpenAI.CreateVectorStoreRequestChunkingStrategy? Type655 { get; set; } + public global::OpenAI.CreateVectorStoreRequest? Type655 { get; set; } /// /// /// - public global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminator? Type656 { get; set; } + public global::OpenAI.VectorStoreExpirationAfter? Type656 { get; set; } /// /// /// - public global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? Type657 { get; set; } + public global::OpenAI.VectorStoreExpirationAfterAnchor? Type657 { get; set; } /// /// /// - public global::OpenAI.DefaultProjectErrorResponse? Type658 { get; set; } + public global::OpenAI.CreateVectorStoreRequestChunkingStrategy? Type658 { get; set; } /// /// /// - public global::OpenAI.DeleteAssistantResponse? Type659 { get; set; } + public global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminator? Type659 { get; set; } /// /// /// - public global::OpenAI.DeleteAssistantResponseObject? Type660 { get; set; } + public global::OpenAI.CreateVectorStoreRequestChunkingStrategyDiscriminatorType? Type660 { get; set; } /// /// /// - public global::OpenAI.DeleteFileResponse? Type661 { get; set; } + public global::OpenAI.DefaultProjectErrorResponse? Type661 { get; set; } /// /// /// - public global::OpenAI.DeleteFileResponseObject? Type662 { get; set; } + public global::OpenAI.DeleteAssistantResponse? Type662 { get; set; } /// /// /// - public global::OpenAI.DeleteMessageResponse? Type663 { get; set; } + public global::OpenAI.DeleteAssistantResponseObject? Type663 { get; set; } /// /// /// - public global::OpenAI.DeleteMessageResponseObject? Type664 { get; set; } + public global::OpenAI.DeleteFileResponse? Type664 { get; set; } /// /// /// - public global::OpenAI.DeleteModelResponse? Type665 { get; set; } + public global::OpenAI.DeleteFileResponseObject? Type665 { get; set; } /// /// /// - public global::OpenAI.DeleteThreadResponse? Type666 { get; set; } + public global::OpenAI.DeleteMessageResponse? Type666 { get; set; } /// /// /// - public global::OpenAI.DeleteThreadResponseObject? Type667 { get; set; } + public global::OpenAI.DeleteMessageResponseObject? Type667 { get; set; } /// /// /// - public global::OpenAI.DeleteVectorStoreFileResponse? Type668 { get; set; } + public global::OpenAI.DeleteModelResponse? Type668 { get; set; } /// /// /// - public global::OpenAI.DeleteVectorStoreFileResponseObject? Type669 { get; set; } + public global::OpenAI.DeleteThreadResponse? Type669 { get; set; } /// /// /// - public global::OpenAI.DeleteVectorStoreResponse? Type670 { get; set; } + public global::OpenAI.DeleteThreadResponseObject? Type670 { get; set; } /// /// /// - public global::OpenAI.DeleteVectorStoreResponseObject? Type671 { get; set; } + public global::OpenAI.DeleteVectorStoreFileResponse? Type671 { get; set; } /// /// /// - public global::OpenAI.ErrorResponse? Type672 { get; set; } + public global::OpenAI.DeleteVectorStoreFileResponseObject? Type672 { get; set; } /// /// /// - public global::OpenAI.FineTuneChatCompletionRequestAssistantMessage? Type673 { get; set; } + public global::OpenAI.DeleteVectorStoreResponse? Type673 { get; set; } /// /// /// - public global::OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? Type674 { get; set; } + public global::OpenAI.DeleteVectorStoreResponseObject? Type674 { get; set; } /// /// /// - public global::OpenAI.FineTuningIntegration? Type675 { get; set; } + public global::OpenAI.ErrorResponse? Type675 { get; set; } /// /// /// - public global::OpenAI.FineTuningIntegrationType? Type676 { get; set; } + public global::OpenAI.FineTuneChatCompletionRequestAssistantMessage? Type676 { get; set; } /// /// /// - public global::OpenAI.FineTuningIntegrationWandb? Type677 { get; set; } + public global::OpenAI.FineTuneChatCompletionRequestAssistantMessageVariant1? Type677 { get; set; } /// /// /// - public global::OpenAI.FineTuningJob? Type678 { get; set; } + public global::OpenAI.FineTuningIntegration? Type678 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobError? Type679 { get; set; } + public global::OpenAI.FineTuningIntegrationType? Type679 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobHyperparameters? Type680 { get; set; } + public global::OpenAI.FineTuningIntegrationWandb? Type680 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type681 { get; set; } + public global::OpenAI.FineTuningJob? Type681 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobHyperparametersNEpochs? Type682 { get; set; } + public global::OpenAI.FineTuningJobError? Type682 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobObject? Type683 { get; set; } + public global::OpenAI.FineTuningJobHyperparameters? Type683 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobStatus? Type684 { get; set; } + public global::OpenAI.OneOf? Type684 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type685 { get; set; } + public global::OpenAI.FineTuningJobHyperparametersNEpochs? Type685 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type686 { get; set; } + public global::OpenAI.FineTuningJobObject? Type686 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobCheckpoint? Type687 { get; set; } + public global::OpenAI.FineTuningJobStatus? Type687 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobCheckpointMetrics? Type688 { get; set; } + public global::System.Collections.Generic.IList>? Type688 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobCheckpointObject? Type689 { get; set; } + public global::OpenAI.OneOf? Type689 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobEvent? Type690 { get; set; } + public global::OpenAI.FineTuningJobCheckpoint? Type690 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobEventLevel? Type691 { get; set; } + public global::OpenAI.FineTuningJobCheckpointMetrics? Type691 { get; set; } /// /// /// - public global::OpenAI.FineTuningJobEventObject? Type692 { get; set; } + public global::OpenAI.FineTuningJobCheckpointObject? Type692 { get; set; } /// /// /// - public global::OpenAI.FinetuneChatRequestInput? Type693 { get; set; } + public global::OpenAI.FineTuningJobEvent? Type693 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type694 { get; set; } + public global::OpenAI.FineTuningJobEventLevel? Type694 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type695 { get; set; } + public global::OpenAI.FineTuningJobEventObject? Type695 { get; set; } /// /// /// - public global::OpenAI.FinetuneCompletionRequestInput? Type696 { get; set; } + public global::OpenAI.FinetuneChatRequestInput? Type696 { get; set; } /// /// /// - public global::OpenAI.Image? Type697 { get; set; } + public global::System.Collections.Generic.IList>? Type697 { get; set; } /// /// /// - public global::OpenAI.ImagesResponse? Type698 { get; set; } + public global::OpenAI.OneOf? Type698 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type699 { get; set; } + public global::OpenAI.FinetuneCompletionRequestInput? Type699 { get; set; } /// /// /// - public global::OpenAI.Invite? Type700 { get; set; } + public global::OpenAI.Image? Type700 { get; set; } /// /// /// - public global::OpenAI.InviteObject? Type701 { get; set; } + public global::OpenAI.ImagesResponse? Type701 { get; set; } /// /// /// - public global::OpenAI.InviteRole? Type702 { get; set; } + public global::System.Collections.Generic.IList? Type702 { get; set; } /// /// /// - public global::OpenAI.InviteStatus? Type703 { get; set; } + public global::OpenAI.Invite? Type703 { get; set; } /// /// /// - public global::OpenAI.InviteDeleteResponse? Type704 { get; set; } + public global::OpenAI.InviteObject? Type704 { get; set; } /// /// /// - public global::OpenAI.InviteDeleteResponseObject? Type705 { get; set; } + public global::OpenAI.InviteRole? Type705 { get; set; } /// /// /// - public global::OpenAI.InviteListResponse? Type706 { get; set; } + public global::OpenAI.InviteStatus? Type706 { get; set; } /// /// /// - public global::OpenAI.InviteListResponseObject? Type707 { get; set; } + public global::OpenAI.InviteDeleteResponse? Type707 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type708 { get; set; } + public global::OpenAI.InviteDeleteResponseObject? Type708 { get; set; } /// /// /// - public global::OpenAI.InviteRequest? Type709 { get; set; } + public global::OpenAI.InviteListResponse? Type709 { get; set; } /// /// /// - public global::OpenAI.InviteRequestRole? Type710 { get; set; } + public global::OpenAI.InviteListResponseObject? Type710 { get; set; } /// /// /// - public global::OpenAI.ListAssistantsResponse? Type711 { get; set; } + public global::System.Collections.Generic.IList? Type711 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type712 { get; set; } + public global::OpenAI.InviteRequest? Type712 { get; set; } /// /// /// - public global::OpenAI.ListAuditLogsResponse? Type713 { get; set; } + public global::OpenAI.InviteRequestRole? Type713 { get; set; } /// /// /// - public global::OpenAI.ListAuditLogsResponseObject? Type714 { get; set; } + public global::OpenAI.ListAssistantsResponse? Type714 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type715 { get; set; } + public global::System.Collections.Generic.IList? Type715 { get; set; } /// /// /// - public global::OpenAI.ListBatchesResponse? Type716 { get; set; } + public global::OpenAI.ListAuditLogsResponse? Type716 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type717 { get; set; } + public global::OpenAI.ListAuditLogsResponseObject? Type717 { get; set; } /// /// /// - public global::OpenAI.ListBatchesResponseObject? Type718 { get; set; } + public global::System.Collections.Generic.IList? Type718 { get; set; } /// /// /// - public global::OpenAI.ListFilesResponse? Type719 { get; set; } + public global::OpenAI.ListBatchesResponse? Type719 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type720 { get; set; } + public global::System.Collections.Generic.IList? Type720 { get; set; } /// /// /// - public global::OpenAI.OpenAIFile? Type721 { get; set; } + public global::OpenAI.ListBatchesResponseObject? Type721 { get; set; } /// /// /// - public global::OpenAI.OpenAIFileObject? Type722 { get; set; } + public global::OpenAI.ListFilesResponse? Type722 { get; set; } /// /// /// - public global::OpenAI.OpenAIFilePurpose? Type723 { get; set; } + public global::System.Collections.Generic.IList? Type723 { get; set; } /// /// /// - public global::OpenAI.OpenAIFileStatus? Type724 { get; set; } + public global::OpenAI.OpenAIFile? Type724 { get; set; } /// /// /// - public global::OpenAI.ListFineTuningJobCheckpointsResponse? Type725 { get; set; } + public global::OpenAI.OpenAIFileObject? Type725 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type726 { get; set; } + public global::OpenAI.OpenAIFilePurpose? Type726 { get; set; } /// /// /// - public global::OpenAI.ListFineTuningJobCheckpointsResponseObject? Type727 { get; set; } + public global::OpenAI.OpenAIFileStatus? Type727 { get; set; } /// /// /// - public global::OpenAI.ListFineTuningJobEventsResponse? Type728 { get; set; } + public global::OpenAI.ListFineTuningJobCheckpointsResponse? Type728 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type729 { get; set; } + public global::System.Collections.Generic.IList? Type729 { get; set; } /// /// /// - public global::OpenAI.ListFineTuningJobEventsResponseObject? Type730 { get; set; } + public global::OpenAI.ListFineTuningJobCheckpointsResponseObject? Type730 { get; set; } /// /// /// - public global::OpenAI.ListMessagesResponse? Type731 { get; set; } + public global::OpenAI.ListFineTuningJobEventsResponse? Type731 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type732 { get; set; } + public global::System.Collections.Generic.IList? Type732 { get; set; } /// /// /// - public global::OpenAI.ListModelsResponse? Type733 { get; set; } + public global::OpenAI.ListFineTuningJobEventsResponseObject? Type733 { get; set; } /// /// /// - public global::OpenAI.ListModelsResponseObject? Type734 { get; set; } + public global::OpenAI.ListMessagesResponse? Type734 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type735 { get; set; } + public global::System.Collections.Generic.IList? Type735 { get; set; } /// /// /// - public global::OpenAI.Model15? Type736 { get; set; } + public global::OpenAI.ListModelsResponse? Type736 { get; set; } /// /// /// - public global::OpenAI.ModelObject? Type737 { get; set; } + public global::OpenAI.ListModelsResponseObject? Type737 { get; set; } /// /// /// - public global::OpenAI.ListPaginatedFineTuningJobsResponse? Type738 { get; set; } + public global::System.Collections.Generic.IList? Type738 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type739 { get; set; } + public global::OpenAI.Model15? Type739 { get; set; } /// /// /// - public global::OpenAI.ListPaginatedFineTuningJobsResponseObject? Type740 { get; set; } + public global::OpenAI.ModelObject? Type740 { get; set; } /// /// /// - public global::OpenAI.ListRunStepsResponse? Type741 { get; set; } + public global::OpenAI.ListPaginatedFineTuningJobsResponse? Type741 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type742 { get; set; } + public global::System.Collections.Generic.IList? Type742 { get; set; } /// /// /// - public global::OpenAI.ListRunsResponse? Type743 { get; set; } + public global::OpenAI.ListPaginatedFineTuningJobsResponseObject? Type743 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type744 { get; set; } + public global::OpenAI.ListRunStepsResponse? Type744 { get; set; } /// /// /// - public global::OpenAI.ListThreadsResponse? Type745 { get; set; } + public global::System.Collections.Generic.IList? Type745 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type746 { get; set; } + public global::OpenAI.ListRunsResponse? Type746 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoreFilesResponse? Type747 { get; set; } + public global::System.Collections.Generic.IList? Type747 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type748 { get; set; } + public global::OpenAI.ListThreadsResponse? Type748 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObject? Type749 { get; set; } + public global::System.Collections.Generic.IList? Type749 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectObject? Type750 { get; set; } + public global::OpenAI.ListVectorStoreFilesResponse? Type750 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectStatus? Type751 { get; set; } + public global::System.Collections.Generic.IList? Type751 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectLastError? Type752 { get; set; } + public global::OpenAI.VectorStoreFileObject? Type752 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectLastErrorCode? Type753 { get; set; } + public global::OpenAI.VectorStoreFileObjectObject? Type753 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectChunkingStrategy? Type754 { get; set; } + public global::OpenAI.VectorStoreFileObjectStatus? Type754 { get; set; } /// /// /// - public global::OpenAI.StaticChunkingStrategyResponseParam? Type755 { get; set; } + public global::OpenAI.VectorStoreFileObjectLastError? Type755 { get; set; } /// /// /// - public global::OpenAI.StaticChunkingStrategyResponseParamType? Type756 { get; set; } + public global::OpenAI.VectorStoreFileObjectLastErrorCode? Type756 { get; set; } /// /// /// - public global::OpenAI.OtherChunkingStrategyResponseParam? Type757 { get; set; } + public global::OpenAI.VectorStoreFileObjectChunkingStrategy? Type757 { get; set; } /// /// /// - public global::OpenAI.OtherChunkingStrategyResponseParamType? Type758 { get; set; } + public global::OpenAI.StaticChunkingStrategyResponseParam? Type758 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminator? Type759 { get; set; } + public global::OpenAI.StaticChunkingStrategyResponseParamType? Type759 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType? Type760 { get; set; } + public global::OpenAI.OtherChunkingStrategyResponseParam? Type760 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoresResponse? Type761 { get; set; } + public global::OpenAI.OtherChunkingStrategyResponseParamType? Type761 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type762 { get; set; } + public global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminator? Type762 { get; set; } /// /// /// - public global::OpenAI.VectorStoreObject? Type763 { get; set; } + public global::OpenAI.VectorStoreFileObjectChunkingStrategyDiscriminatorType? Type763 { get; set; } /// /// /// - public global::OpenAI.VectorStoreObjectObject? Type764 { get; set; } + public global::OpenAI.ListVectorStoresResponse? Type764 { get; set; } /// /// /// - public global::OpenAI.VectorStoreObjectFileCounts? Type765 { get; set; } + public global::System.Collections.Generic.IList? Type765 { get; set; } /// /// /// - public global::OpenAI.VectorStoreObjectStatus? Type766 { get; set; } + public global::OpenAI.VectorStoreObject? Type766 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequest? Type767 { get; set; } + public global::OpenAI.VectorStoreObjectObject? Type767 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type768 { get; set; } + public global::OpenAI.VectorStoreObjectFileCounts? Type768 { get; set; } /// /// /// - public global::OpenAI.ToolsItem7? Type769 { get; set; } + public global::OpenAI.VectorStoreObjectStatus? Type769 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequestToolDiscriminator? Type770 { get; set; } + public global::OpenAI.ModifyAssistantRequest? Type770 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequestToolDiscriminatorType? Type771 { get; set; } + public global::System.Collections.Generic.IList? Type771 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequestToolResources? Type772 { get; set; } + public global::OpenAI.ToolsItem7? Type772 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? Type773 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolDiscriminator? Type773 { get; set; } /// /// /// - public global::OpenAI.ModifyAssistantRequestToolResourcesFileSearch? Type774 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolDiscriminatorType? Type774 { get; set; } /// /// /// - public global::OpenAI.ModifyMessageRequest? Type775 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolResources? Type775 { get; set; } /// /// /// - public global::OpenAI.ModifyRunRequest? Type776 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolResourcesCodeInterpreter? Type776 { get; set; } /// /// /// - public global::OpenAI.ModifyThreadRequest? Type777 { get; set; } + public global::OpenAI.ModifyAssistantRequestToolResourcesFileSearch? Type777 { get; set; } /// /// /// - public global::OpenAI.ModifyThreadRequestToolResources? Type778 { get; set; } + public global::OpenAI.ModifyMessageRequest? Type778 { get; set; } /// /// /// - public global::OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? Type779 { get; set; } + public global::OpenAI.ModifyRunRequest? Type779 { get; set; } /// /// /// - public global::OpenAI.ModifyThreadRequestToolResourcesFileSearch? Type780 { get; set; } + public global::OpenAI.ModifyThreadRequest? Type780 { get; set; } /// /// /// - public global::OpenAI.Project? Type781 { get; set; } + public global::OpenAI.ModifyThreadRequestToolResources? Type781 { get; set; } /// /// /// - public global::OpenAI.ProjectObject? Type782 { get; set; } + public global::OpenAI.ModifyThreadRequestToolResourcesCodeInterpreter? Type782 { get; set; } /// /// /// - public global::OpenAI.ProjectStatus? Type783 { get; set; } + public global::OpenAI.ModifyThreadRequestToolResourcesFileSearch? Type783 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKey? Type784 { get; set; } + public global::OpenAI.Project? Type784 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyObject? Type785 { get; set; } + public global::OpenAI.ProjectObject? Type785 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyOwner? Type786 { get; set; } + public global::OpenAI.ProjectStatus? Type786 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyOwnerType? Type787 { get; set; } + public global::OpenAI.ProjectApiKey? Type787 { get; set; } /// /// /// - public global::OpenAI.ProjectUser? Type788 { get; set; } + public global::OpenAI.ProjectApiKeyObject? Type788 { get; set; } /// /// /// - public global::OpenAI.ProjectUserObject? Type789 { get; set; } + public global::OpenAI.ProjectApiKeyOwner? Type789 { get; set; } /// /// /// - public global::OpenAI.ProjectUserRole? Type790 { get; set; } + public global::OpenAI.ProjectApiKeyOwnerType? Type790 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccount? Type791 { get; set; } + public global::OpenAI.ProjectUser? Type791 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountObject? Type792 { get; set; } + public global::OpenAI.ProjectUserObject? Type792 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountRole? Type793 { get; set; } + public global::OpenAI.ProjectUserRole? Type793 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyDeleteResponse? Type794 { get; set; } + public global::OpenAI.ProjectServiceAccount? Type794 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyDeleteResponseObject? Type795 { get; set; } + public global::OpenAI.ProjectServiceAccountObject? Type795 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyListResponse? Type796 { get; set; } + public global::OpenAI.ProjectServiceAccountRole? Type796 { get; set; } /// /// /// - public global::OpenAI.ProjectApiKeyListResponseObject? Type797 { get; set; } + public global::OpenAI.ProjectApiKeyDeleteResponse? Type797 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type798 { get; set; } + public global::OpenAI.ProjectApiKeyDeleteResponseObject? Type798 { get; set; } /// /// /// - public global::OpenAI.ProjectCreateRequest? Type799 { get; set; } + public global::OpenAI.ProjectApiKeyListResponse? Type799 { get; set; } /// /// /// - public global::OpenAI.ProjectListResponse? Type800 { get; set; } + public global::OpenAI.ProjectApiKeyListResponseObject? Type800 { get; set; } /// /// /// - public global::OpenAI.ProjectListResponseObject? Type801 { get; set; } + public global::System.Collections.Generic.IList? Type801 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type802 { get; set; } + public global::OpenAI.ProjectCreateRequest? Type802 { get; set; } /// /// /// - public global::OpenAI.ProjectRateLimit? Type803 { get; set; } + public global::OpenAI.ProjectListResponse? Type803 { get; set; } /// /// /// - public global::OpenAI.ProjectRateLimitObject? Type804 { get; set; } + public global::OpenAI.ProjectListResponseObject? Type804 { get; set; } /// /// /// - public global::OpenAI.ProjectRateLimitListResponse? Type805 { get; set; } + public global::System.Collections.Generic.IList? Type805 { get; set; } /// /// /// - public global::OpenAI.ProjectRateLimitListResponseObject? Type806 { get; set; } + public global::OpenAI.ProjectRateLimit? Type806 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type807 { get; set; } + public global::OpenAI.ProjectRateLimitObject? Type807 { get; set; } /// /// /// - public global::OpenAI.ProjectRateLimitUpdateRequest? Type808 { get; set; } + public global::OpenAI.ProjectRateLimitListResponse? Type808 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountApiKey? Type809 { get; set; } + public global::OpenAI.ProjectRateLimitListResponseObject? Type809 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountApiKeyObject? Type810 { get; set; } + public global::System.Collections.Generic.IList? Type810 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountCreateRequest? Type811 { get; set; } + public global::OpenAI.ProjectRateLimitUpdateRequest? Type811 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountCreateResponse? Type812 { get; set; } + public global::OpenAI.ProjectServiceAccountApiKey? Type812 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountCreateResponseObject? Type813 { get; set; } + public global::OpenAI.ProjectServiceAccountApiKeyObject? Type813 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountCreateResponseRole? Type814 { get; set; } + public global::OpenAI.ProjectServiceAccountCreateRequest? Type814 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountDeleteResponse? Type815 { get; set; } + public global::OpenAI.ProjectServiceAccountCreateResponse? Type815 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountDeleteResponseObject? Type816 { get; set; } + public global::OpenAI.ProjectServiceAccountCreateResponseObject? Type816 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountListResponse? Type817 { get; set; } + public global::OpenAI.ProjectServiceAccountCreateResponseRole? Type817 { get; set; } /// /// /// - public global::OpenAI.ProjectServiceAccountListResponseObject? Type818 { get; set; } + public global::OpenAI.ProjectServiceAccountDeleteResponse? Type818 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type819 { get; set; } + public global::OpenAI.ProjectServiceAccountDeleteResponseObject? Type819 { get; set; } /// /// /// - public global::OpenAI.ProjectUpdateRequest? Type820 { get; set; } + public global::OpenAI.ProjectServiceAccountListResponse? Type820 { get; set; } /// /// /// - public global::OpenAI.ProjectUserCreateRequest? Type821 { get; set; } + public global::OpenAI.ProjectServiceAccountListResponseObject? Type821 { get; set; } /// /// /// - public global::OpenAI.ProjectUserCreateRequestRole? Type822 { get; set; } + public global::System.Collections.Generic.IList? Type822 { get; set; } /// /// /// - public global::OpenAI.ProjectUserDeleteResponse? Type823 { get; set; } + public global::OpenAI.ProjectUpdateRequest? Type823 { get; set; } /// /// /// - public global::OpenAI.ProjectUserDeleteResponseObject? Type824 { get; set; } + public global::OpenAI.ProjectUserCreateRequest? Type824 { get; set; } /// /// /// - public global::OpenAI.ProjectUserListResponse? Type825 { get; set; } + public global::OpenAI.ProjectUserCreateRequestRole? Type825 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type826 { get; set; } + public global::OpenAI.ProjectUserDeleteResponse? Type826 { get; set; } /// /// /// - public global::OpenAI.ProjectUserUpdateRequest? Type827 { get; set; } + public global::OpenAI.ProjectUserDeleteResponseObject? Type827 { get; set; } /// /// /// - public global::OpenAI.ProjectUserUpdateRequestRole? Type828 { get; set; } + public global::OpenAI.ProjectUserListResponse? Type828 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventConversationItemCreate? Type829 { get; set; } + public global::System.Collections.Generic.IList? Type829 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItem? Type830 { get; set; } + public global::OpenAI.ProjectUserUpdateRequest? Type830 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemObject? Type831 { get; set; } + public global::OpenAI.ProjectUserUpdateRequestRole? Type831 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemType? Type832 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemCreate? Type832 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemStatus? Type833 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemCreateType? Type833 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemRole? Type834 { get; set; } + public global::OpenAI.RealtimeConversationItem? Type834 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type835 { get; set; } + public global::OpenAI.RealtimeConversationItemObject? Type835 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemContentItem? Type836 { get; set; } + public global::OpenAI.RealtimeConversationItemType? Type836 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemContentItemType? Type837 { get; set; } + public global::OpenAI.RealtimeConversationItemStatus? Type837 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventConversationItemDelete? Type838 { get; set; } + public global::OpenAI.RealtimeConversationItemRole? Type838 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventConversationItemTruncate? Type839 { get; set; } + public global::System.Collections.Generic.IList? Type839 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventInputAudioBufferAppend? Type840 { get; set; } + public global::OpenAI.RealtimeConversationItemContentItem? Type840 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventInputAudioBufferClear? Type841 { get; set; } + public global::OpenAI.RealtimeConversationItemContentItemType? Type841 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventInputAudioBufferCommit? Type842 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemDelete? Type842 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventResponseCancel? Type843 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemDeleteType? Type843 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventResponseCreate? Type844 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemTruncate? Type844 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponse? Type845 { get; set; } + public global::OpenAI.RealtimeClientEventConversationItemTruncateType? Type845 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseObject? Type846 { get; set; } + public global::OpenAI.RealtimeClientEventInputAudioBufferAppend? Type846 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseStatus? Type847 { get; set; } + public global::OpenAI.RealtimeClientEventInputAudioBufferAppendType? Type847 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type848 { get; set; } + public global::OpenAI.RealtimeClientEventInputAudioBufferClear? Type848 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseUsage? Type849 { get; set; } + public global::OpenAI.RealtimeClientEventInputAudioBufferClearType? Type849 { get; set; } /// /// /// - public global::OpenAI.RealtimeClientEventSessionUpdate? Type850 { get; set; } + public global::OpenAI.RealtimeClientEventInputAudioBufferCommit? Type850 { get; set; } /// /// /// - public global::OpenAI.RealtimeSession? Type851 { get; set; } + public global::OpenAI.RealtimeClientEventInputAudioBufferCommitType? Type851 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionObject? Type852 { get; set; } + public global::OpenAI.RealtimeClientEventResponseCancel? Type852 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionVoice? Type853 { get; set; } + public global::OpenAI.RealtimeClientEventResponseCancelType? Type853 { get; set; } /// /// /// - public global::OpenAI.RealtimeAudioFormat? Type854 { get; set; } + public global::OpenAI.RealtimeClientEventResponseCreate? Type854 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionInputAudioTranscription? Type855 { get; set; } + public global::OpenAI.RealtimeClientEventResponseCreateType? Type855 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionTurnDetection? Type856 { get; set; } + public global::OpenAI.RealtimeSession? Type856 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionTurnDetectionType? Type857 { get; set; } + public global::OpenAI.RealtimeSessionObject? Type857 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type858 { get; set; } + public global::OpenAI.RealtimeSessionVoice? Type858 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionTool? Type859 { get; set; } + public global::OpenAI.RealtimeAudioFormat? Type859 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionToolChoice? Type860 { get; set; } + public global::OpenAI.RealtimeSessionInputAudioTranscription? Type860 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type861 { get; set; } + public global::OpenAI.RealtimeSessionTurnDetection? Type861 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionMaxOutputTokens? Type862 { get; set; } + public global::OpenAI.RealtimeSessionTurnDetectionType? Type862 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationCreated? Type863 { get; set; } + public global::System.Collections.Generic.IList? Type863 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationCreatedConversation? Type864 { get; set; } + public global::OpenAI.RealtimeSessionTool? Type864 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemCreated? Type865 { get; set; } + public global::OpenAI.RealtimeSessionToolChoice? Type865 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemDeleted? Type866 { get; set; } + public global::OpenAI.OneOf? Type866 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted? Type867 { get; set; } + public global::OpenAI.RealtimeSessionMaxOutputTokens? Type867 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed? Type868 { get; set; } + public global::OpenAI.RealtimeClientEventSessionUpdate? Type868 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError? Type869 { get; set; } + public global::OpenAI.RealtimeClientEventSessionUpdateType? Type869 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventConversationItemTruncated? Type870 { get; set; } + public global::OpenAI.RealtimeResponse? Type870 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventError? Type871 { get; set; } + public global::OpenAI.RealtimeResponseObject? Type871 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventErrorError? Type872 { get; set; } + public global::OpenAI.RealtimeResponseStatus? Type872 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventInputAudioBufferCleared? Type873 { get; set; } + public global::System.Collections.Generic.IList? Type873 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventInputAudioBufferCommitted? Type874 { get; set; } + public global::OpenAI.RealtimeResponseUsage? Type874 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted? Type875 { get; set; } + public global::OpenAI.RealtimeServerEventConversationCreated? Type875 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped? Type876 { get; set; } + public global::OpenAI.RealtimeServerEventConversationCreatedType? Type876 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventRateLimitsUpdated? Type877 { get; set; } + public global::OpenAI.RealtimeServerEventConversationCreatedConversation? Type877 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type878 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemCreated? Type878 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimit? Type879 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemCreatedType? Type879 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseAudioDelta? Type880 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemDeleted? Type880 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseAudioDone? Type881 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemDeletedType? Type881 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDelta? Type882 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted? Type882 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDone? Type883 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType? Type883 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseContentPartAdded? Type884 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailed? Type884 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseContentPartAddedPart? Type885 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType? Type885 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseContentPartDone? Type886 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError? Type886 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseContentPartDonePart? Type887 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemTruncated? Type887 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseCreated? Type888 { get; set; } + public global::OpenAI.RealtimeServerEventConversationItemTruncatedType? Type888 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseDone? Type889 { get; set; } + public global::OpenAI.RealtimeServerEventError? Type889 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta? Type890 { get; set; } + public global::OpenAI.RealtimeServerEventErrorType? Type890 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone? Type891 { get; set; } + public global::OpenAI.RealtimeServerEventErrorError? Type891 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseOutputItemAdded? Type892 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferCleared? Type892 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseOutputItemDone? Type893 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferClearedType? Type893 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseTextDelta? Type894 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferCommitted? Type894 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventResponseTextDone? Type895 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferCommittedType? Type895 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionCreated? Type896 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStarted? Type896 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventSessionUpdated? Type897 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType? Type897 { get; set; } /// /// /// - public global::OpenAI.SubmitToolOutputsRunRequest? Type898 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStopped? Type898 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type899 { get; set; } + public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType? Type899 { get; set; } /// /// /// - public global::OpenAI.SubmitToolOutputsRunRequestToolOutput? Type900 { get; set; } + public global::OpenAI.RealtimeServerEventRateLimitsUpdated? Type900 { get; set; } /// /// /// - public global::OpenAI.UpdateVectorStoreRequest? Type901 { get; set; } + public global::OpenAI.RealtimeServerEventRateLimitsUpdatedType? Type901 { get; set; } /// /// /// - public global::OpenAI.Upload? Type902 { get; set; } + public global::System.Collections.Generic.IList? Type902 { get; set; } /// /// /// - public global::OpenAI.UploadStatus? Type903 { get; set; } + public global::OpenAI.RealtimeServerEventRateLimitsUpdatedRateLimit? Type903 { get; set; } /// /// /// - public global::OpenAI.UploadObject? Type904 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioDelta? Type904 { get; set; } /// /// /// - public global::OpenAI.UploadPart? Type905 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioDeltaType? Type905 { get; set; } /// /// /// - public global::OpenAI.UploadPartObject? Type906 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioDone? Type906 { get; set; } /// /// /// - public global::OpenAI.User? Type907 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioDoneType? Type907 { get; set; } /// /// /// - public global::OpenAI.UserObject? Type908 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDelta? Type908 { get; set; } /// /// /// - public global::OpenAI.UserRole? Type909 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType? Type909 { get; set; } /// /// /// - public global::OpenAI.UserDeleteResponse? Type910 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDone? Type910 { get; set; } /// /// /// - public global::OpenAI.UserDeleteResponseObject? Type911 { get; set; } + public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType? Type911 { get; set; } /// /// /// - public global::OpenAI.UserListResponse? Type912 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartAdded? Type912 { get; set; } /// /// /// - public global::OpenAI.UserListResponseObject? Type913 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartAddedType? Type913 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type914 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartAddedPart? Type914 { get; set; } /// /// /// - public global::OpenAI.UserRoleUpdateRequest? Type915 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartAddedPartType? Type915 { get; set; } /// /// /// - public global::OpenAI.UserRoleUpdateRequestRole? Type916 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartDone? Type916 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileBatchObject? Type917 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartDoneType? Type917 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileBatchObjectObject? Type918 { get; set; } + public global::OpenAI.RealtimeServerEventResponseContentPartDonePart? Type918 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileBatchObjectStatus? Type919 { get; set; } + public global::OpenAI.RealtimeServerEventResponseCreated? Type919 { get; set; } /// /// /// - public global::OpenAI.VectorStoreFileBatchObjectFileCounts? Type920 { get; set; } + public global::OpenAI.RealtimeServerEventResponseCreatedType? Type920 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventType? Type921 { get; set; } + public global::OpenAI.RealtimeServerEventResponseDone? Type921 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventBase? Type922 { get; set; } + public global::OpenAI.RealtimeServerEventResponseDoneType? Type922 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversation? Type923 { get; set; } + public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDelta? Type923 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationObject? Type924 { get; set; } + public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType? Type924 { get; set; } /// /// /// - public global::OpenAI.RealtimeContentPart? Type925 { get; set; } + public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDone? Type925 { get; set; } /// /// /// - public global::OpenAI.RealtimeContentPartType? Type926 { get; set; } + public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType? Type926 { get; set; } /// /// /// - public global::OpenAI.RealtimeErrorDetails? Type927 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemAdded? Type927 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionUpdate? Type928 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemAddedType? Type928 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionUpdateType? Type929 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemDone? Type929 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferAppend? Type930 { get; set; } + public global::OpenAI.RealtimeServerEventResponseOutputItemDoneType? Type930 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferAppendType? Type931 { get; set; } + public global::OpenAI.RealtimeServerEventResponseTextDelta? Type931 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCommit? Type932 { get; set; } + public global::OpenAI.RealtimeServerEventResponseTextDeltaType? Type932 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCommitType? Type933 { get; set; } + public global::OpenAI.RealtimeServerEventResponseTextDone? Type933 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferClear? Type934 { get; set; } + public global::OpenAI.RealtimeServerEventResponseTextDoneType? Type934 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferClearType? Type935 { get; set; } + public global::OpenAI.RealtimeServerEventSessionCreated? Type935 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemCreate? Type936 { get; set; } + public global::OpenAI.RealtimeServerEventSessionCreatedType? Type936 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemCreateType? Type937 { get; set; } + public global::OpenAI.RealtimeServerEventSessionUpdated? Type937 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemTruncate? Type938 { get; set; } + public global::OpenAI.RealtimeServerEventSessionUpdatedType? Type938 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemTruncateType? Type939 { get; set; } + public global::OpenAI.SubmitToolOutputsRunRequest? Type939 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemDelete? Type940 { get; set; } + public global::System.Collections.Generic.IList? Type940 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemDeleteType? Type941 { get; set; } + public global::OpenAI.SubmitToolOutputsRunRequestToolOutput? Type941 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreate? Type942 { get; set; } + public global::OpenAI.UpdateVectorStoreRequest? Type942 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateType? Type943 { get; set; } + public global::OpenAI.Upload? Type943 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponse? Type944 { get; set; } + public global::OpenAI.UploadStatus? Type944 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type945 { get; set; } + public global::OpenAI.UploadObject? Type945 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseModalitie? Type946 { get; set; } + public global::OpenAI.UploadPart? Type946 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseVoice? Type947 { get; set; } + public global::OpenAI.UploadPartObject? Type947 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type948 { get; set; } + public global::OpenAI.UsageAudioSpeechesResult? Type948 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseTool? Type949 { get; set; } + public global::OpenAI.UsageAudioSpeechesResultObject? Type949 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type950 { get; set; } + public global::OpenAI.UsageAudioTranscriptionsResult? Type950 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseToolChoice? Type951 { get; set; } + public global::OpenAI.UsageAudioTranscriptionsResultObject? Type951 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type952 { get; set; } + public global::OpenAI.UsageCodeInterpreterSessionsResult? Type952 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreateResponseMaxOutputTokens? Type953 { get; set; } + public global::OpenAI.UsageCodeInterpreterSessionsResultObject? Type953 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCancel? Type954 { get; set; } + public global::OpenAI.UsageCompletionsResult? Type954 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCancelType? Type955 { get; set; } + public global::OpenAI.UsageCompletionsResultObject? Type955 { get; set; } /// /// /// - public global::OpenAI.RealtimeError? Type956 { get; set; } + public global::OpenAI.UsageEmbeddingsResult? Type956 { get; set; } /// /// /// - public global::OpenAI.RealtimeErrorType? Type957 { get; set; } + public global::OpenAI.UsageEmbeddingsResultObject? Type957 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionCreated? Type958 { get; set; } + public global::OpenAI.UsageImagesResult? Type958 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionCreatedType? Type959 { get; set; } + public global::OpenAI.UsageImagesResultObject? Type959 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionUpdated? Type960 { get; set; } + public global::OpenAI.UsageModerationsResult? Type960 { get; set; } /// /// /// - public global::OpenAI.RealtimeSessionUpdatedType? Type961 { get; set; } + public global::OpenAI.UsageModerationsResultObject? Type961 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationCreated? Type962 { get; set; } + public global::OpenAI.UsageResponse? Type962 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationCreatedType? Type963 { get; set; } + public global::OpenAI.UsageResponseObject? Type963 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemCreated? Type964 { get; set; } + public global::System.Collections.Generic.IList? Type964 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemCreatedType? Type965 { get; set; } + public global::OpenAI.UsageTimeBucket? Type965 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? Type966 { get; set; } + public global::OpenAI.UsageTimeBucketObject? Type966 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompletedType? Type967 { get; set; } + public global::System.Collections.Generic.IList? Type967 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? Type968 { get; set; } + public global::OpenAI.ResultItem? Type968 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailedType? Type969 { get; set; } + public global::OpenAI.UsageVectorStoresResult? Type969 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemTruncated? Type970 { get; set; } + public global::OpenAI.UsageVectorStoresResultObject? Type970 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemTruncatedType? Type971 { get; set; } + public global::OpenAI.UsageTimeBucketResultItemDiscriminator? Type971 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemDeleted? Type972 { get; set; } + public global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject? Type972 { get; set; } /// /// /// - public global::OpenAI.RealtimeConversationItemDeletedType? Type973 { get; set; } + public global::OpenAI.User? Type973 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCommitted? Type974 { get; set; } + public global::OpenAI.UserObject? Type974 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCommittedType? Type975 { get; set; } + public global::OpenAI.UserRole? Type975 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferCleared? Type976 { get; set; } + public global::OpenAI.UserDeleteResponse? Type976 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferClearedType? Type977 { get; set; } + public global::OpenAI.UserDeleteResponseObject? Type977 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferSpeechStarted? Type978 { get; set; } + public global::OpenAI.UserListResponse? Type978 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferSpeechStartedType? Type979 { get; set; } + public global::OpenAI.UserListResponseObject? Type979 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferSpeechStopped? Type980 { get; set; } + public global::System.Collections.Generic.IList? Type980 { get; set; } /// /// /// - public global::OpenAI.RealtimeInputAudioBufferSpeechStoppedType? Type981 { get; set; } + public global::OpenAI.UserRoleUpdateRequest? Type981 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreated? Type982 { get; set; } + public global::OpenAI.UserRoleUpdateRequestRole? Type982 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseCreatedType? Type983 { get; set; } + public global::OpenAI.VectorStoreFileBatchObject? Type983 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseDone? Type984 { get; set; } + public global::OpenAI.VectorStoreFileBatchObjectObject? Type984 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseDoneType? Type985 { get; set; } + public global::OpenAI.VectorStoreFileBatchObjectStatus? Type985 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseOutputItemAdded? Type986 { get; set; } + public global::OpenAI.VectorStoreFileBatchObjectFileCounts? Type986 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseOutputItemAddedType? Type987 { get; set; } + public global::OpenAI.RealtimeServerEventType? Type987 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseOutputItemDone? Type988 { get; set; } + public global::OpenAI.RealtimeServerEventBase? Type988 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseOutputItemDoneType? Type989 { get; set; } + public global::OpenAI.RealtimeConversation? Type989 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseContentPartAdded? Type990 { get; set; } + public global::OpenAI.RealtimeConversationObject? Type990 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseContentPartAddedType? Type991 { get; set; } + public global::OpenAI.RealtimeContentPart? Type991 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseContentPartDone? Type992 { get; set; } + public global::OpenAI.RealtimeContentPartType? Type992 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseContentPartDoneType? Type993 { get; set; } + public global::OpenAI.RealtimeErrorDetails? Type993 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseTextDelta? Type994 { get; set; } + public global::OpenAI.RealtimeSessionUpdate? Type994 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseTextDeltaType? Type995 { get; set; } + public global::OpenAI.RealtimeSessionUpdateType? Type995 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseTextDone? Type996 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferAppend? Type996 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseTextDoneType? Type997 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferAppendType? Type997 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioTranscriptDelta? Type998 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferCommit? Type998 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioTranscriptDeltaType? Type999 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferCommitType? Type999 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioTranscriptDone? Type1000 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferClear? Type1000 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioTranscriptDoneType? Type1001 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferClearType? Type1001 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioDelta? Type1002 { get; set; } + public global::OpenAI.RealtimeConversationItemCreate? Type1002 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioDeltaType? Type1003 { get; set; } + public global::OpenAI.RealtimeConversationItemCreateType? Type1003 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioDone? Type1004 { get; set; } + public global::OpenAI.RealtimeConversationItemTruncate? Type1004 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseAudioDoneType? Type1005 { get; set; } + public global::OpenAI.RealtimeConversationItemTruncateType? Type1005 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta? Type1006 { get; set; } + public global::OpenAI.RealtimeConversationItemDelete? Type1006 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseFunctionCallArgumentsDeltaType? Type1007 { get; set; } + public global::OpenAI.RealtimeConversationItemDeleteType? Type1007 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseFunctionCallArgumentsDone? Type1008 { get; set; } + public global::OpenAI.RealtimeResponseCreate? Type1008 { get; set; } /// /// /// - public global::OpenAI.RealtimeResponseFunctionCallArgumentsDoneType? Type1009 { get; set; } + public global::OpenAI.RealtimeResponseCreateType? Type1009 { get; set; } /// /// /// - public global::OpenAI.RealtimeRateLimitsUpdated? Type1010 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponse? Type1010 { get; set; } /// /// /// - public global::OpenAI.RealtimeRateLimitsUpdatedType? Type1011 { get; set; } + public global::System.Collections.Generic.IList? Type1011 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1012 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseModalitie? Type1012 { get; set; } /// /// /// - public global::OpenAI.RealtimeRateLimitsUpdatedRateLimit? Type1013 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseVoice? Type1013 { get; set; } /// /// /// - public global::OpenAI.RealtimeRateLimitsUpdatedRateLimitName? Type1014 { get; set; } + public global::System.Collections.Generic.IList? Type1014 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEvent? Type1015 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseTool? Type1015 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventDiscriminator? Type1016 { get; set; } + public global::OpenAI.OneOf? Type1016 { get; set; } /// /// /// - public global::OpenAI.RealtimeServerEventDiscriminatorType? Type1017 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseToolChoice? Type1017 { get; set; } /// /// /// - public global::OpenAI.CreateBatchRequest? Type1018 { get; set; } + public global::OpenAI.OneOf? Type1018 { get; set; } /// /// /// - public global::OpenAI.CreateBatchRequestEndpoint? Type1019 { get; set; } + public global::OpenAI.RealtimeResponseCreateResponseMaxOutputTokens? Type1019 { get; set; } /// /// /// - public global::OpenAI.CreateBatchRequestCompletionWindow? Type1020 { get; set; } + public global::OpenAI.RealtimeResponseCancel? Type1020 { get; set; } /// /// /// - public global::OpenAI.ListAssistantsOrder? Type1021 { get; set; } + public global::OpenAI.RealtimeResponseCancelType? Type1021 { get; set; } /// /// /// - public global::OpenAI.ListFilesOrder? Type1022 { get; set; } + public global::OpenAI.RealtimeError? Type1022 { get; set; } /// /// /// - public global::OpenAI.ListAuditLogsEffectiveAt? Type1023 { get; set; } + public global::OpenAI.RealtimeErrorType? Type1023 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1024 { get; set; } + public global::OpenAI.RealtimeSessionCreated? Type1024 { get; set; } /// /// /// - public global::OpenAI.ListMessagesOrder? Type1025 { get; set; } + public global::OpenAI.RealtimeSessionCreatedType? Type1025 { get; set; } /// /// /// - public global::OpenAI.ListRunsOrder? Type1026 { get; set; } + public global::OpenAI.RealtimeSessionUpdated? Type1026 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1027 { get; set; } + public global::OpenAI.RealtimeSessionUpdatedType? Type1027 { get; set; } /// /// /// - public global::OpenAI.CreateRunIncludeItem? Type1028 { get; set; } + public global::OpenAI.RealtimeConversationCreated? Type1028 { get; set; } /// /// /// - public global::OpenAI.ListRunStepsOrder? Type1029 { get; set; } + public global::OpenAI.RealtimeConversationCreatedType? Type1029 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1030 { get; set; } + public global::OpenAI.RealtimeConversationItemCreated? Type1030 { get; set; } /// /// /// - public global::OpenAI.ListRunStepsIncludeItem? Type1031 { get; set; } + public global::OpenAI.RealtimeConversationItemCreatedType? Type1031 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type1032 { get; set; } + public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompleted? Type1032 { get; set; } /// /// /// - public global::OpenAI.GetRunStepIncludeItem? Type1033 { get; set; } + public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionCompletedType? Type1033 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoresOrder? Type1034 { get; set; } + public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailed? Type1034 { get; set; } /// /// /// - public global::OpenAI.ListFilesInVectorStoreBatchOrder? Type1035 { get; set; } + public global::OpenAI.RealtimeConversationItemInputAudioTranscriptionFailedType? Type1035 { get; set; } /// /// /// - public global::OpenAI.ListFilesInVectorStoreBatchFilter? Type1036 { get; set; } + public global::OpenAI.RealtimeConversationItemTruncated? Type1036 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoreFilesOrder? Type1037 { get; set; } + public global::OpenAI.RealtimeConversationItemTruncatedType? Type1037 { get; set; } /// /// /// - public global::OpenAI.ListVectorStoreFilesFilter? Type1038 { get; set; } + public global::OpenAI.RealtimeConversationItemDeleted? Type1038 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type1039 { get; set; } + public global::OpenAI.RealtimeConversationItemDeletedType? Type1039 { get; set; } /// /// /// - public global::OpenAI.OneOf? Type1040 { get; set; } + public global::OpenAI.RealtimeInputAudioBufferCommitted? Type1040 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferCommittedType? Type1041 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferCleared? Type1042 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferClearedType? Type1043 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferSpeechStarted? Type1044 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferSpeechStartedType? Type1045 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferSpeechStopped? Type1046 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeInputAudioBufferSpeechStoppedType? Type1047 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseCreated? Type1048 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseCreatedType? Type1049 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseDone? Type1050 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseDoneType? Type1051 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseOutputItemAdded? Type1052 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseOutputItemAddedType? Type1053 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseOutputItemDone? Type1054 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseOutputItemDoneType? Type1055 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseContentPartAdded? Type1056 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseContentPartAddedType? Type1057 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseContentPartDone? Type1058 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseContentPartDoneType? Type1059 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseTextDelta? Type1060 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseTextDeltaType? Type1061 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseTextDone? Type1062 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseTextDoneType? Type1063 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioTranscriptDelta? Type1064 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioTranscriptDeltaType? Type1065 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioTranscriptDone? Type1066 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioTranscriptDoneType? Type1067 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioDelta? Type1068 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioDeltaType? Type1069 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioDone? Type1070 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseAudioDoneType? Type1071 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseFunctionCallArgumentsDelta? Type1072 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseFunctionCallArgumentsDeltaType? Type1073 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseFunctionCallArgumentsDone? Type1074 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeResponseFunctionCallArgumentsDoneType? Type1075 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeRateLimitsUpdated? Type1076 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeRateLimitsUpdatedType? Type1077 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1078 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeRateLimitsUpdatedRateLimit? Type1079 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeRateLimitsUpdatedRateLimitName? Type1080 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeServerEvent? Type1081 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeServerEventDiscriminator? Type1082 { get; set; } + /// + /// + /// + public global::OpenAI.RealtimeServerEventDiscriminatorType? Type1083 { get; set; } + /// + /// + /// + public global::OpenAI.CreateBatchRequest? Type1084 { get; set; } + /// + /// + /// + public global::OpenAI.CreateBatchRequestEndpoint? Type1085 { get; set; } + /// + /// + /// + public global::OpenAI.CreateBatchRequestCompletionWindow? Type1086 { get; set; } + /// + /// + /// + public global::OpenAI.ListAssistantsOrder? Type1087 { get; set; } + /// + /// + /// + public global::OpenAI.ListFilesOrder? Type1088 { get; set; } + /// + /// + /// + public global::OpenAI.ListAuditLogsEffectiveAt? Type1089 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1090 { get; set; } + /// + /// + /// + public global::OpenAI.UsageCostsBucketWidth? Type1091 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1092 { get; set; } + /// + /// + /// + public global::OpenAI.UsageCostsGroupByItem? Type1093 { get; set; } + /// + /// + /// + public global::OpenAI.UsageAudioSpeechesBucketWidth? Type1094 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1095 { get; set; } + /// + /// + /// + public global::OpenAI.UsageAudioSpeechesGroupByItem? Type1096 { get; set; } + /// + /// + /// + public global::OpenAI.UsageAudioTranscriptionsBucketWidth? Type1097 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1098 { get; set; } + /// + /// + /// + public global::OpenAI.UsageAudioTranscriptionsGroupByItem? Type1099 { get; set; } + /// + /// + /// + public global::OpenAI.UsageCodeInterpreterSessionsBucketWidth? Type1100 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1101 { get; set; } + /// + /// + /// + public global::OpenAI.UsageCodeInterpreterSessionsGroupByItem? Type1102 { get; set; } + /// + /// + /// + public global::OpenAI.UsageCompletionsBucketWidth? Type1103 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1104 { get; set; } + /// + /// + /// + public global::OpenAI.UsageCompletionsGroupByItem? Type1105 { get; set; } + /// + /// + /// + public global::OpenAI.UsageEmbeddingsBucketWidth? Type1106 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1107 { get; set; } + /// + /// + /// + public global::OpenAI.UsageEmbeddingsGroupByItem? Type1108 { get; set; } + /// + /// + /// + public global::OpenAI.UsageImagesBucketWidth? Type1109 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1110 { get; set; } + /// + /// + /// + public global::OpenAI.UsageImagesSource? Type1111 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1112 { get; set; } + /// + /// + /// + public global::OpenAI.UsageImagesSize? Type1113 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1114 { get; set; } + /// + /// + /// + public global::OpenAI.UsageImagesGroupByItem? Type1115 { get; set; } + /// + /// + /// + public global::OpenAI.UsageModerationsBucketWidth? Type1116 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1117 { get; set; } + /// + /// + /// + public global::OpenAI.UsageModerationsGroupByItem? Type1118 { get; set; } + /// + /// + /// + public global::OpenAI.UsageVectorStoresBucketWidth? Type1119 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1120 { get; set; } + /// + /// + /// + public global::OpenAI.UsageVectorStoresGroupByItem? Type1121 { get; set; } + /// + /// + /// + public global::OpenAI.ListMessagesOrder? Type1122 { get; set; } + /// + /// + /// + public global::OpenAI.ListRunsOrder? Type1123 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1124 { get; set; } + /// + /// + /// + public global::OpenAI.CreateRunIncludeItem? Type1125 { get; set; } + /// + /// + /// + public global::OpenAI.ListRunStepsOrder? Type1126 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1127 { get; set; } + /// + /// + /// + public global::OpenAI.ListRunStepsIncludeItem? Type1128 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type1129 { get; set; } + /// + /// + /// + public global::OpenAI.GetRunStepIncludeItem? Type1130 { get; set; } + /// + /// + /// + public global::OpenAI.ListVectorStoresOrder? Type1131 { get; set; } + /// + /// + /// + public global::OpenAI.ListFilesInVectorStoreBatchOrder? Type1132 { get; set; } + /// + /// + /// + public global::OpenAI.ListFilesInVectorStoreBatchFilter? Type1133 { get; set; } + /// + /// + /// + public global::OpenAI.ListVectorStoreFilesOrder? Type1134 { get; set; } + /// + /// + /// + public global::OpenAI.ListVectorStoreFilesFilter? Type1135 { get; set; } + /// + /// + /// + public global::OpenAI.OneOf? Type1136 { get; set; } + /// + /// + /// + public global::OpenAI.OneOf? Type1137 { get; set; } } } \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IOpenAiApi.g.cs b/src/libs/OpenAI/Generated/OpenAI.IOpenAiApi.g.cs index f7fb9d94..80d7f819 100644 --- a/src/libs/OpenAI/Generated/OpenAI.IOpenAiApi.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.IOpenAiApi.g.cs @@ -102,6 +102,11 @@ public partial interface IOpenAiApi : global::System.IDisposable /// public AuditLogsClient AuditLogs { get; } + /// + /// + /// + public UsageClient Usage { get; } + /// /// /// diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageAudioSpeeches.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageAudioSpeeches.g.cs new file mode 100644 index 00000000..c6de6801 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageAudioSpeeches.g.cs @@ -0,0 +1,37 @@ +#nullable enable + +namespace OpenAI +{ + public partial interface IUsageClient + { + /// + /// Get audio speeches usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsageAudioSpeechesAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageAudioSpeechesBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageAudioTranscriptions.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageAudioTranscriptions.g.cs new file mode 100644 index 00000000..0305a4cb --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageAudioTranscriptions.g.cs @@ -0,0 +1,37 @@ +#nullable enable + +namespace OpenAI +{ + public partial interface IUsageClient + { + /// + /// Get audio transcriptions usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsageAudioTranscriptionsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageAudioTranscriptionsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCodeInterpreterSessions.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCodeInterpreterSessions.g.cs new file mode 100644 index 00000000..f4dada56 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCodeInterpreterSessions.g.cs @@ -0,0 +1,31 @@ +#nullable enable + +namespace OpenAI +{ + public partial interface IUsageClient + { + /// + /// Get code interpreter sessions usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsageCodeInterpreterSessionsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageCodeInterpreterSessionsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCompletions.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCompletions.g.cs new file mode 100644 index 00000000..8d7ea14a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCompletions.g.cs @@ -0,0 +1,39 @@ +#nullable enable + +namespace OpenAI +{ + public partial interface IUsageClient + { + /// + /// Get completions usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsageCompletionsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageCompletionsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + bool? batch = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCosts.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCosts.g.cs new file mode 100644 index 00000000..688d6fa4 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageCosts.g.cs @@ -0,0 +1,33 @@ +#nullable enable + +namespace OpenAI +{ + public partial interface IUsageClient + { + /// + /// Get costs details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// Default Value: 7 + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsageCostsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageCostsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageEmbeddings.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageEmbeddings.g.cs new file mode 100644 index 00000000..4e4d42a4 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageEmbeddings.g.cs @@ -0,0 +1,37 @@ +#nullable enable + +namespace OpenAI +{ + public partial interface IUsageClient + { + /// + /// Get embeddings usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsageEmbeddingsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageEmbeddingsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageImages.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageImages.g.cs new file mode 100644 index 00000000..be3389ee --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageImages.g.cs @@ -0,0 +1,41 @@ +#nullable enable + +namespace OpenAI +{ + public partial interface IUsageClient + { + /// + /// Get images usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsageImagesAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageImagesBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? sources = default, + global::System.Collections.Generic.IList? sizes = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageModerations.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageModerations.g.cs new file mode 100644 index 00000000..adf31945 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageModerations.g.cs @@ -0,0 +1,37 @@ +#nullable enable + +namespace OpenAI +{ + public partial interface IUsageClient + { + /// + /// Get moderations usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsageModerationsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageModerationsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageVectorStores.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageVectorStores.g.cs new file mode 100644 index 00000000..3896fc8d --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.UsageVectorStores.g.cs @@ -0,0 +1,31 @@ +#nullable enable + +namespace OpenAI +{ + public partial interface IUsageClient + { + /// + /// Get vector stores usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task UsageVectorStoresAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageVectorStoresBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.IUsageClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.g.cs new file mode 100644 index 00000000..016eafbc --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.IUsageClient.g.cs @@ -0,0 +1,40 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public partial interface IUsageClient : global::System.IDisposable + { + /// + /// The HttpClient instance. + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + /// The base URL for the API. + /// + public System.Uri? BaseUri { get; } + + /// + /// The authorizations to use for the requests. + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + /// Gets or sets a value indicating whether the response content should be read as a string. + /// True by default in debug builds, false otherwise. + /// + public bool ReadResponseAsString { get; set; } + + /// + /// + /// + global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } + + + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CostsResult.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResult.Json.g.cs new file mode 100644 index 00000000..61fcb258 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class CostsResult + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CostsResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CostsResult), + jsonSerializerContext) as global::OpenAI.CostsResult; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CostsResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.CostsResult), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.CostsResult; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CostsResult.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResult.g.cs new file mode 100644 index 00000000..f829e8b6 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResult.g.cs @@ -0,0 +1,75 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The aggregated costs details of the specific time bucket. + /// + public sealed partial class CostsResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CostsResultObjectJsonConverter))] + public global::OpenAI.CostsResultObject Object { get; set; } + + /// + /// The monetary value in its associated currency. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("amount")] + public global::OpenAI.CostsResultAmount? Amount { get; set; } + + /// + /// When `group_by=line_item`, this field provides the line item of the grouped costs result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("line_item")] + public string? LineItem { get; set; } + + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped costs result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The monetary value in its associated currency. + /// + /// + /// When `group_by=line_item`, this field provides the line item of the grouped costs result. + /// + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped costs result. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public CostsResult( + global::OpenAI.CostsResultObject @object, + global::OpenAI.CostsResultAmount? amount, + string? lineItem, + string? projectId) + { + this.Object = @object; + this.Amount = amount; + this.LineItem = lineItem; + this.ProjectId = projectId; + } + + /// + /// Initializes a new instance of the class. + /// + public CostsResult() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CostsResultAmount.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResultAmount.Json.g.cs new file mode 100644 index 00000000..38c48a99 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResultAmount.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class CostsResultAmount + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.CostsResultAmount? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.CostsResultAmount), + jsonSerializerContext) as global::OpenAI.CostsResultAmount; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.CostsResultAmount? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.CostsResultAmount), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.CostsResultAmount; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CostsResultAmount.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResultAmount.g.cs new file mode 100644 index 00000000..f213c93b --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResultAmount.g.cs @@ -0,0 +1,54 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The monetary value in its associated currency. + /// + public sealed partial class CostsResultAmount + { + /// + /// The numeric value of the cost. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("value")] + public double? Value { get; set; } + + /// + /// Lowercase ISO-4217 currency e.g. "usd" + /// + [global::System.Text.Json.Serialization.JsonPropertyName("currency")] + public string? Currency { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// The numeric value of the cost. + /// + /// + /// Lowercase ISO-4217 currency e.g. "usd" + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public CostsResultAmount( + double? value, + string? currency) + { + this.Value = value; + this.Currency = currency; + } + + /// + /// Initializes a new instance of the class. + /// + public CostsResultAmount() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CostsResultObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResultObject.g.cs new file mode 100644 index 00000000..d78bf50d --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CostsResultObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum CostsResultObject + { + /// + /// + /// + OrganizationCostsResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class CostsResultObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this CostsResultObject value) + { + return value switch + { + CostsResultObject.OrganizationCostsResult => "organization.costs.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static CostsResultObject? ToEnum(string value) + { + return value switch + { + "organization.costs.result" => CostsResultObject.OrganizationCostsResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestModel.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestModel.g.cs index 6b555e9d..ea5d8ed9 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestModel.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateAssistantRequestModel.g.cs @@ -15,6 +15,10 @@ public enum CreateAssistantRequestModel /// /// /// + Gpt4o20241120, + /// + /// + /// Gpt4o20240806, /// /// @@ -115,6 +119,7 @@ public static string ToValueString(this CreateAssistantRequestModel value) return value switch { CreateAssistantRequestModel.Gpt4o => "gpt-4o", + CreateAssistantRequestModel.Gpt4o20241120 => "gpt-4o-2024-11-20", CreateAssistantRequestModel.Gpt4o20240806 => "gpt-4o-2024-08-06", CreateAssistantRequestModel.Gpt4o20240513 => "gpt-4o-2024-05-13", CreateAssistantRequestModel.Gpt4oMini => "gpt-4o-mini", @@ -148,6 +153,7 @@ public static string ToValueString(this CreateAssistantRequestModel value) return value switch { "gpt-4o" => CreateAssistantRequestModel.Gpt4o, + "gpt-4o-2024-11-20" => CreateAssistantRequestModel.Gpt4o20241120, "gpt-4o-2024-08-06" => CreateAssistantRequestModel.Gpt4o20240806, "gpt-4o-2024-05-13" => CreateAssistantRequestModel.Gpt4o20240513, "gpt-4o-mini" => CreateAssistantRequestModel.Gpt4oMini, diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestAudio.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestAudio.g.cs index f2905804..5565e290 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestAudio.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestAudio.g.cs @@ -10,8 +10,7 @@ namespace OpenAI public sealed partial class CreateChatCompletionRequestAudio { /// - /// The voice the model uses to respond. Supported voices are `alloy`,
- /// `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`. + /// The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive). ///
[global::System.Text.Json.Serialization.JsonPropertyName("voice")] [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.CreateChatCompletionRequestAudioVoiceJsonConverter))] @@ -37,8 +36,7 @@ public sealed partial class CreateChatCompletionRequestAudio /// Initializes a new instance of the class. ///
/// - /// The voice the model uses to respond. Supported voices are `alloy`,
- /// `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`. + /// The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive). /// /// /// Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,
diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestAudioVoice.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestAudioVoice.g.cs index 4703354c..6a0889c0 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestAudioVoice.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestAudioVoice.g.cs @@ -4,8 +4,7 @@ namespace OpenAI { /// - /// The voice the model uses to respond. Supported voices are `alloy`,
- /// `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`. + /// The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive). ///
public enum CreateChatCompletionRequestAudioVoice { diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestModel.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestModel.g.cs index b2e174c7..386b03f3 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestModel.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateChatCompletionRequestModel.g.cs @@ -31,6 +31,10 @@ public enum CreateChatCompletionRequestModel /// /// /// + Gpt4o20241120, + /// + /// + /// Gpt4o20240806, /// /// @@ -159,6 +163,7 @@ public static string ToValueString(this CreateChatCompletionRequestModel value) CreateChatCompletionRequestModel.O1Mini => "o1-mini", CreateChatCompletionRequestModel.O1Mini20240912 => "o1-mini-2024-09-12", CreateChatCompletionRequestModel.Gpt4o => "gpt-4o", + CreateChatCompletionRequestModel.Gpt4o20241120 => "gpt-4o-2024-11-20", CreateChatCompletionRequestModel.Gpt4o20240806 => "gpt-4o-2024-08-06", CreateChatCompletionRequestModel.Gpt4o20240513 => "gpt-4o-2024-05-13", CreateChatCompletionRequestModel.Gpt4oRealtimePreview => "gpt-4o-realtime-preview", @@ -202,6 +207,7 @@ public static string ToValueString(this CreateChatCompletionRequestModel value) "o1-mini" => CreateChatCompletionRequestModel.O1Mini, "o1-mini-2024-09-12" => CreateChatCompletionRequestModel.O1Mini20240912, "gpt-4o" => CreateChatCompletionRequestModel.Gpt4o, + "gpt-4o-2024-11-20" => CreateChatCompletionRequestModel.Gpt4o20241120, "gpt-4o-2024-08-06" => CreateChatCompletionRequestModel.Gpt4o20240806, "gpt-4o-2024-05-13" => CreateChatCompletionRequestModel.Gpt4o20240513, "gpt-4o-realtime-preview" => CreateChatCompletionRequestModel.Gpt4oRealtimePreview, diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestModel.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestModel.g.cs index bf7b966a..c4cf792d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestModel.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateRunRequestModel.g.cs @@ -15,6 +15,10 @@ public enum CreateRunRequestModel /// /// /// + Gpt4o20241120, + /// + /// + /// Gpt4o20240806, /// /// @@ -115,6 +119,7 @@ public static string ToValueString(this CreateRunRequestModel value) return value switch { CreateRunRequestModel.Gpt4o => "gpt-4o", + CreateRunRequestModel.Gpt4o20241120 => "gpt-4o-2024-11-20", CreateRunRequestModel.Gpt4o20240806 => "gpt-4o-2024-08-06", CreateRunRequestModel.Gpt4o20240513 => "gpt-4o-2024-05-13", CreateRunRequestModel.Gpt4oMini => "gpt-4o-mini", @@ -148,6 +153,7 @@ public static string ToValueString(this CreateRunRequestModel value) return value switch { "gpt-4o" => CreateRunRequestModel.Gpt4o, + "gpt-4o-2024-11-20" => CreateRunRequestModel.Gpt4o20241120, "gpt-4o-2024-08-06" => CreateRunRequestModel.Gpt4o20240806, "gpt-4o-2024-05-13" => CreateRunRequestModel.Gpt4o20240513, "gpt-4o-mini" => CreateRunRequestModel.Gpt4oMini, diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestModel.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestModel.g.cs index 0968b027..7103f907 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestModel.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.CreateThreadAndRunRequestModel.g.cs @@ -15,6 +15,10 @@ public enum CreateThreadAndRunRequestModel /// /// /// + Gpt4o20241120, + /// + /// + /// Gpt4o20240806, /// /// @@ -115,6 +119,7 @@ public static string ToValueString(this CreateThreadAndRunRequestModel value) return value switch { CreateThreadAndRunRequestModel.Gpt4o => "gpt-4o", + CreateThreadAndRunRequestModel.Gpt4o20241120 => "gpt-4o-2024-11-20", CreateThreadAndRunRequestModel.Gpt4o20240806 => "gpt-4o-2024-08-06", CreateThreadAndRunRequestModel.Gpt4o20240513 => "gpt-4o-2024-05-13", CreateThreadAndRunRequestModel.Gpt4oMini => "gpt-4o-mini", @@ -148,6 +153,7 @@ public static string ToValueString(this CreateThreadAndRunRequestModel value) return value switch { "gpt-4o" => CreateThreadAndRunRequestModel.Gpt4o, + "gpt-4o-2024-11-20" => CreateThreadAndRunRequestModel.Gpt4o20241120, "gpt-4o-2024-08-06" => CreateThreadAndRunRequestModel.Gpt4o20240806, "gpt-4o-2024-05-13" => CreateThreadAndRunRequestModel.Gpt4o20240513, "gpt-4o-mini" => CreateThreadAndRunRequestModel.Gpt4oMini, diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemCreate.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemCreate.g.cs index 82f350d2..2724c94f 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemCreate.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemCreate.g.cs @@ -4,8 +4,12 @@ namespace OpenAI { /// - /// Add a new Item to the Conversation's context, including messages, function calls, and function call responses. This event can be used both to populate a "history" of the conversation and to add new items mid-stream, but has the current limitation that it cannot populate assistant audio messages.
- /// If successful, the server will respond with a `conversation.item.created` event, otherwise an `error` event will be sent. + /// Add a new Item to the Conversation's context, including messages, function
+ /// calls, and function call responses. This event can be used both to populate a
+ /// "history" of the conversation and to add new items mid-stream, but has the
+ /// current limitation that it cannot populate assistant audio messages.
+ /// If successful, the server will respond with a `conversation.item.created`
+ /// event, otherwise an `error` event will be sent. ///
public sealed partial class RealtimeClientEventConversationItemCreate { @@ -19,11 +23,14 @@ public sealed partial class RealtimeClientEventConversationItemCreate /// The event type, must be `conversation.item.create`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeClientEventConversationItemCreateTypeJsonConverter))] + public global::OpenAI.RealtimeClientEventConversationItemCreateType Type { get; set; } /// - /// The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added. + /// The ID of the preceding item after which the new item will be inserted.
+ /// If not set, the new item will be appended to the end of the conversation.
+ /// If set, it allows an item to be inserted mid-conversation. If the ID
+ /// cannot be found, an error will be returned and the item will not be added. ///
[global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] public string? PreviousItemId { get; set; } @@ -55,7 +62,10 @@ public sealed partial class RealtimeClientEventConversationItemCreate /// The event type, must be `conversation.item.create`. /// /// - /// The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added. + /// The ID of the preceding item after which the new item will be inserted.
+ /// If not set, the new item will be appended to the end of the conversation.
+ /// If set, it allows an item to be inserted mid-conversation. If the ID
+ /// cannot be found, an error will be returned and the item will not be added. /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
@@ -66,14 +76,14 @@ public sealed partial class RealtimeClientEventConversationItemCreate /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeClientEventConversationItemCreate( - string type, global::OpenAI.RealtimeConversationItem item, string? eventId, + global::OpenAI.RealtimeClientEventConversationItemCreateType type, string? previousItemId) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); this.EventId = eventId; + this.Type = type; this.PreviousItemId = previousItemId; } diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemCreateType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemCreateType.g.cs new file mode 100644 index 00000000..d5c0b9ea --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemCreateType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `conversation.item.create`. + /// + public enum RealtimeClientEventConversationItemCreateType + { + /// + /// + /// + ConversationItemCreate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeClientEventConversationItemCreateTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeClientEventConversationItemCreateType value) + { + return value switch + { + RealtimeClientEventConversationItemCreateType.ConversationItemCreate => "conversation.item.create", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeClientEventConversationItemCreateType? ToEnum(string value) + { + return value switch + { + "conversation.item.create" => RealtimeClientEventConversationItemCreateType.ConversationItemCreate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemDelete.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemDelete.g.cs index d51d4c26..7b9c8f4c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemDelete.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemDelete.g.cs @@ -4,7 +4,10 @@ namespace OpenAI { /// - /// Send this event when you want to remove any item from the conversation history. The server will respond with a `conversation.item.deleted` event, unless the item does not exist in the conversation history, in which case the server will respond with an error. + /// Send this event when you want to remove any item from the conversation
+ /// history. The server will respond with a `conversation.item.deleted` event,
+ /// unless the item does not exist in the conversation history, in which case the
+ /// server will respond with an error. ///
public sealed partial class RealtimeClientEventConversationItemDelete { @@ -15,11 +18,11 @@ public sealed partial class RealtimeClientEventConversationItemDelete public string? EventId { get; set; } /// - /// The event type, must be "conversation.item.delete". + /// The event type, must be `conversation.item.delete`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeClientEventConversationItemDeleteTypeJsonConverter))] + public global::OpenAI.RealtimeClientEventConversationItemDeleteType Type { get; set; } /// /// The ID of the item to delete. @@ -41,20 +44,20 @@ public sealed partial class RealtimeClientEventConversationItemDelete /// Optional client-generated ID used to identify this event. /// /// - /// The event type, must be "conversation.item.delete". + /// The event type, must be `conversation.item.delete`. /// /// /// The ID of the item to delete. /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeClientEventConversationItemDelete( - string type, string itemId, - string? eventId) + string? eventId, + global::OpenAI.RealtimeClientEventConversationItemDeleteType type) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.EventId = eventId; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemDeleteType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemDeleteType.g.cs new file mode 100644 index 00000000..d8e0bb4a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemDeleteType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `conversation.item.delete`. + /// + public enum RealtimeClientEventConversationItemDeleteType + { + /// + /// + /// + ConversationItemDelete, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeClientEventConversationItemDeleteTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeClientEventConversationItemDeleteType value) + { + return value switch + { + RealtimeClientEventConversationItemDeleteType.ConversationItemDelete => "conversation.item.delete", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeClientEventConversationItemDeleteType? ToEnum(string value) + { + return value switch + { + "conversation.item.delete" => RealtimeClientEventConversationItemDeleteType.ConversationItemDelete, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemTruncate.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemTruncate.g.cs index f26fdba0..2183ca6b 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemTruncate.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemTruncate.g.cs @@ -4,9 +4,15 @@ namespace OpenAI { /// - /// Send this event to truncate a previous assistant message’s audio. The server will produce audio faster than realtime, so this event is useful when the user interrupts to truncate audio that has already been sent to the client but not yet played. This will synchronize the server's understanding of the audio with the client's playback.
- /// Truncating audio will delete the server-side text transcript to ensure there is not text in the context that hasn't been heard by the user.
- /// If successful, the server will respond with a `conversation.item.truncated` event. + /// Send this event to truncate a previous assistant message’s audio. The server
+ /// will produce audio faster than realtime, so this event is useful when the user
+ /// interrupts to truncate audio that has already been sent to the client but not
+ /// yet played. This will synchronize the server's understanding of the audio with
+ /// the client's playback.
+ /// Truncating audio will delete the server-side text transcript to ensure there
+ /// is not text in the context that hasn't been heard by the user.
+ /// If successful, the server will respond with a `conversation.item.truncated`
+ /// event. ///
public sealed partial class RealtimeClientEventConversationItemTruncate { @@ -17,14 +23,15 @@ public sealed partial class RealtimeClientEventConversationItemTruncate public string? EventId { get; set; } /// - /// The event type, must be "conversation.item.truncate". + /// The event type, must be `conversation.item.truncate`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeClientEventConversationItemTruncateTypeJsonConverter))] + public global::OpenAI.RealtimeClientEventConversationItemTruncateType Type { get; set; } /// - /// The ID of the assistant message item to truncate. Only assistant message items can be truncated. + /// The ID of the assistant message item to truncate. Only assistant message
+ /// items can be truncated. ///
[global::System.Text.Json.Serialization.JsonPropertyName("item_id")] [global::System.Text.Json.Serialization.JsonRequired] @@ -38,7 +45,9 @@ public sealed partial class RealtimeClientEventConversationItemTruncate public required int ContentIndex { get; set; } /// - /// Inclusive duration up to which audio is truncated, in milliseconds. If the audio_end_ms is greater than the actual audio duration, the server will respond with an error. + /// Inclusive duration up to which audio is truncated, in milliseconds. If
+ /// the audio_end_ms is greater than the actual audio duration, the server
+ /// will respond with an error. ///
[global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] [global::System.Text.Json.Serialization.JsonRequired] @@ -57,30 +66,33 @@ public sealed partial class RealtimeClientEventConversationItemTruncate /// Optional client-generated ID used to identify this event. /// /// - /// The event type, must be "conversation.item.truncate". + /// The event type, must be `conversation.item.truncate`. /// /// - /// The ID of the assistant message item to truncate. Only assistant message items can be truncated. + /// The ID of the assistant message item to truncate. Only assistant message
+ /// items can be truncated. /// /// /// The index of the content part to truncate. Set this to 0. /// /// - /// Inclusive duration up to which audio is truncated, in milliseconds. If the audio_end_ms is greater than the actual audio duration, the server will respond with an error. + /// Inclusive duration up to which audio is truncated, in milliseconds. If
+ /// the audio_end_ms is greater than the actual audio duration, the server
+ /// will respond with an error. /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeClientEventConversationItemTruncate( - string type, string itemId, int contentIndex, int audioEndMs, - string? eventId) + string? eventId, + global::OpenAI.RealtimeClientEventConversationItemTruncateType type) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.ContentIndex = contentIndex; this.AudioEndMs = audioEndMs; this.EventId = eventId; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemTruncateType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemTruncateType.g.cs new file mode 100644 index 00000000..eef89a5e --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventConversationItemTruncateType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `conversation.item.truncate`. + /// + public enum RealtimeClientEventConversationItemTruncateType + { + /// + /// + /// + ConversationItemTruncate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeClientEventConversationItemTruncateTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeClientEventConversationItemTruncateType value) + { + return value switch + { + RealtimeClientEventConversationItemTruncateType.ConversationItemTruncate => "conversation.item.truncate", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeClientEventConversationItemTruncateType? ToEnum(string value) + { + return value switch + { + "conversation.item.truncate" => RealtimeClientEventConversationItemTruncateType.ConversationItemTruncate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferAppend.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferAppend.g.cs index c161b636..b55c6d08 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferAppend.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferAppend.g.cs @@ -4,8 +4,15 @@ namespace OpenAI { /// - /// Send this event to append audio bytes to the input audio buffer. The audio buffer is temporary storage you can write to and later commit. In Server VAD mode, the audio buffer is used to detect speech and the server will decide when to commit. When Server VAD is disabled, you must commit the audio buffer manually.
- /// The client may choose how much audio to place in each event up to a maximum of 15 MiB, for example streaming smaller chunks from the client may allow the VAD to be more responsive. Unlike made other client events, the server will not send a confirmation response to this event. + /// Send this event to append audio bytes to the input audio buffer. The audio
+ /// buffer is temporary storage you can write to and later commit. In Server VAD
+ /// mode, the audio buffer is used to detect speech and the server will decide
+ /// when to commit. When Server VAD is disabled, you must commit the audio buffer
+ /// manually.
+ /// The client may choose how much audio to place in each event up to a maximum
+ /// of 15 MiB, for example streaming smaller chunks from the client may allow the
+ /// VAD to be more responsive. Unlike made other client events, the server will
+ /// not send a confirmation response to this event. ///
public sealed partial class RealtimeClientEventInputAudioBufferAppend { @@ -16,14 +23,15 @@ public sealed partial class RealtimeClientEventInputAudioBufferAppend public string? EventId { get; set; } /// - /// The event type, must be "input_audio_buffer.append". + /// The event type, must be `input_audio_buffer.append`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferAppendTypeJsonConverter))] + public global::OpenAI.RealtimeClientEventInputAudioBufferAppendType Type { get; set; } /// - /// Base64-encoded audio bytes. This must be in the format specified by the `input_audio_format` field in the session configuration. + /// Base64-encoded audio bytes. This must be in the format specified by the
+ /// `input_audio_format` field in the session configuration. ///
[global::System.Text.Json.Serialization.JsonPropertyName("audio")] [global::System.Text.Json.Serialization.JsonRequired] @@ -42,20 +50,21 @@ public sealed partial class RealtimeClientEventInputAudioBufferAppend /// Optional client-generated ID used to identify this event. /// /// - /// The event type, must be "input_audio_buffer.append". + /// The event type, must be `input_audio_buffer.append`. /// /// - /// Base64-encoded audio bytes. This must be in the format specified by the `input_audio_format` field in the session configuration. + /// Base64-encoded audio bytes. This must be in the format specified by the
+ /// `input_audio_format` field in the session configuration. /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeClientEventInputAudioBufferAppend( - string type, string audio, - string? eventId) + string? eventId, + global::OpenAI.RealtimeClientEventInputAudioBufferAppendType type) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Audio = audio ?? throw new global::System.ArgumentNullException(nameof(audio)); this.EventId = eventId; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferAppendType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferAppendType.g.cs new file mode 100644 index 00000000..a24603d9 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferAppendType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `input_audio_buffer.append`. + /// + public enum RealtimeClientEventInputAudioBufferAppendType + { + /// + /// + /// + InputAudioBufferAppend, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeClientEventInputAudioBufferAppendTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeClientEventInputAudioBufferAppendType value) + { + return value switch + { + RealtimeClientEventInputAudioBufferAppendType.InputAudioBufferAppend => "input_audio_buffer.append", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeClientEventInputAudioBufferAppendType? ToEnum(string value) + { + return value switch + { + "input_audio_buffer.append" => RealtimeClientEventInputAudioBufferAppendType.InputAudioBufferAppend, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferClear.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferClear.g.cs index 15c0ec5f..df7f7d44 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferClear.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferClear.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Send this event to clear the audio bytes in the buffer. The server will respond with an `input_audio_buffer.cleared` event. + /// Send this event to clear the audio bytes in the buffer. The server will
+ /// respond with an `input_audio_buffer.cleared` event. ///
public sealed partial class RealtimeClientEventInputAudioBufferClear { @@ -15,11 +16,11 @@ public sealed partial class RealtimeClientEventInputAudioBufferClear public string? EventId { get; set; } /// - /// The event type, must be "input_audio_buffer.clear". + /// The event type, must be `input_audio_buffer.clear`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferClearTypeJsonConverter))] + public global::OpenAI.RealtimeClientEventInputAudioBufferClearType Type { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -34,15 +35,15 @@ public sealed partial class RealtimeClientEventInputAudioBufferClear /// Optional client-generated ID used to identify this event. /// /// - /// The event type, must be "input_audio_buffer.clear". + /// The event type, must be `input_audio_buffer.clear`. /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeClientEventInputAudioBufferClear( - string type, - string? eventId) + string? eventId, + global::OpenAI.RealtimeClientEventInputAudioBufferClearType type) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.EventId = eventId; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferClearType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferClearType.g.cs new file mode 100644 index 00000000..4a3cc122 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferClearType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `input_audio_buffer.clear`. + /// + public enum RealtimeClientEventInputAudioBufferClearType + { + /// + /// + /// + InputAudioBufferClear, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeClientEventInputAudioBufferClearTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeClientEventInputAudioBufferClearType value) + { + return value switch + { + RealtimeClientEventInputAudioBufferClearType.InputAudioBufferClear => "input_audio_buffer.clear", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeClientEventInputAudioBufferClearType? ToEnum(string value) + { + return value switch + { + "input_audio_buffer.clear" => RealtimeClientEventInputAudioBufferClearType.InputAudioBufferClear, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferCommit.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferCommit.g.cs index d6e57200..b8ccf6fc 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferCommit.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferCommit.g.cs @@ -4,8 +4,15 @@ namespace OpenAI { /// - /// Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically.
- /// Committing the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event. + /// Send this event to commit the user input audio buffer, which will create a
+ /// new user message item in the conversation. This event will produce an error
+ /// if the input audio buffer is empty. When in Server VAD mode, the client does
+ /// not need to send this event, the server will commit the audio buffer
+ /// automatically.
+ /// Committing the input audio buffer will trigger input audio transcription
+ /// (if enabled in session configuration), but it will not create a response
+ /// from the model. The server will respond with an `input_audio_buffer.committed`
+ /// event. ///
public sealed partial class RealtimeClientEventInputAudioBufferCommit { @@ -16,11 +23,11 @@ public sealed partial class RealtimeClientEventInputAudioBufferCommit public string? EventId { get; set; } /// - /// The event type, must be "input_audio_buffer.commit". + /// The event type, must be `input_audio_buffer.commit`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeClientEventInputAudioBufferCommitTypeJsonConverter))] + public global::OpenAI.RealtimeClientEventInputAudioBufferCommitType Type { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -35,15 +42,15 @@ public sealed partial class RealtimeClientEventInputAudioBufferCommit /// Optional client-generated ID used to identify this event. /// /// - /// The event type, must be "input_audio_buffer.commit". + /// The event type, must be `input_audio_buffer.commit`. /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeClientEventInputAudioBufferCommit( - string type, - string? eventId) + string? eventId, + global::OpenAI.RealtimeClientEventInputAudioBufferCommitType type) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.EventId = eventId; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferCommitType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferCommitType.g.cs new file mode 100644 index 00000000..052f671d --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventInputAudioBufferCommitType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `input_audio_buffer.commit`. + /// + public enum RealtimeClientEventInputAudioBufferCommitType + { + /// + /// + /// + InputAudioBufferCommit, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeClientEventInputAudioBufferCommitTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeClientEventInputAudioBufferCommitType value) + { + return value switch + { + RealtimeClientEventInputAudioBufferCommitType.InputAudioBufferCommit => "input_audio_buffer.commit", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeClientEventInputAudioBufferCommitType? ToEnum(string value) + { + return value switch + { + "input_audio_buffer.commit" => RealtimeClientEventInputAudioBufferCommitType.InputAudioBufferCommit, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCancel.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCancel.g.cs index 0d341fc2..2dcfc829 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCancel.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCancel.g.cs @@ -4,7 +4,9 @@ namespace OpenAI { /// - /// Send this event to cancel an in-progress response. The server will respond with a `response.cancelled` event or an error if there is no response to cancel. + /// Send this event to cancel an in-progress response. The server will respond
+ /// with a `response.cancelled` event or an error if there is no response to
+ /// cancel. ///
public sealed partial class RealtimeClientEventResponseCancel { @@ -18,8 +20,8 @@ public sealed partial class RealtimeClientEventResponseCancel /// The event type, must be `response.cancel`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeClientEventResponseCancelTypeJsonConverter))] + public global::OpenAI.RealtimeClientEventResponseCancelType Type { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -38,11 +40,11 @@ public sealed partial class RealtimeClientEventResponseCancel /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeClientEventResponseCancel( - string type, - string? eventId) + string? eventId, + global::OpenAI.RealtimeClientEventResponseCancelType type) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.EventId = eventId; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCancelType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCancelType.g.cs new file mode 100644 index 00000000..6bab4b6c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCancelType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.cancel`. + /// + public enum RealtimeClientEventResponseCancelType + { + /// + /// + /// + ResponseCancel, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeClientEventResponseCancelTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeClientEventResponseCancelType value) + { + return value switch + { + RealtimeClientEventResponseCancelType.ResponseCancel => "response.cancel", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeClientEventResponseCancelType? ToEnum(string value) + { + return value switch + { + "response.cancel" => RealtimeClientEventResponseCancelType.ResponseCancel, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCreate.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCreate.g.cs index d33cc68d..33f334b6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCreate.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCreate.g.cs @@ -4,10 +4,18 @@ namespace OpenAI { /// - /// This event instructs the server to create a Response, which means triggering model inference. When in Server VAD mode, the server will create Responses automatically.
- /// A Response will include at least one Item, and may have two, in which case the second will be a function call. These Items will be appended to the conversation history.
- /// The server will respond with a `response.created` event, events for Items and content created, and finally a `response.done` event to indicate the Response is complete.
- /// The `response.create` event includes inference configuration like `instructions`, and `temperature`. These fields will override the Session's configuration for this Response only. + /// This event instructs the server to create a Response, which means triggering
+ /// model inference. When in Server VAD mode, the server will create Responses
+ /// automatically.
+ /// A Response will include at least one Item, and may have two, in which case
+ /// the second will be a function call. These Items will be appended to the
+ /// conversation history.
+ /// The server will respond with a `response.created` event, events for Items
+ /// and content created, and finally a `response.done` event to indicate the
+ /// Response is complete.
+ /// The `response.create` event includes inference configuration like
+ /// `instructions`, and `temperature`. These fields will override the Session's
+ /// configuration for this Response only. ///
public sealed partial class RealtimeClientEventResponseCreate { @@ -21,15 +29,20 @@ public sealed partial class RealtimeClientEventResponseCreate /// The event type, must be `response.create`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeClientEventResponseCreateTypeJsonConverter))] + public global::OpenAI.RealtimeClientEventResponseCreateType Type { get; set; } /// - /// The response resource. + /// A session refers to a single WebSocket connection between a client and the server.
+ /// Once a client creates a session, it then sends JSON-formatted events containing text and audio chunks.
+ /// The server will respond in kind with audio containing voice output, a text transcript of that voice output,
+ /// and function calls (if functions are provided by the client).
+ /// A realtime Session represents the overall client-server interaction, and contains default configuration.
+ /// It has a set of default values which can be updated at any time (via session.update) or on a per-response level (via response.create). ///
[global::System.Text.Json.Serialization.JsonPropertyName("response")] [global::System.Text.Json.Serialization.JsonRequired] - public required global::OpenAI.RealtimeResponse Response { get; set; } + public required global::OpenAI.RealtimeSession Response { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -47,17 +60,22 @@ public sealed partial class RealtimeClientEventResponseCreate /// The event type, must be `response.create`. /// /// - /// The response resource. + /// A session refers to a single WebSocket connection between a client and the server.
+ /// Once a client creates a session, it then sends JSON-formatted events containing text and audio chunks.
+ /// The server will respond in kind with audio containing voice output, a text transcript of that voice output,
+ /// and function calls (if functions are provided by the client).
+ /// A realtime Session represents the overall client-server interaction, and contains default configuration.
+ /// It has a set of default values which can be updated at any time (via session.update) or on a per-response level (via response.create). /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeClientEventResponseCreate( - string type, - global::OpenAI.RealtimeResponse response, - string? eventId) + global::OpenAI.RealtimeSession response, + string? eventId, + global::OpenAI.RealtimeClientEventResponseCreateType type) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Response = response ?? throw new global::System.ArgumentNullException(nameof(response)); this.EventId = eventId; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCreateType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCreateType.g.cs new file mode 100644 index 00000000..f2b801c1 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventResponseCreateType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.create`. + /// + public enum RealtimeClientEventResponseCreateType + { + /// + /// + /// + ResponseCreate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeClientEventResponseCreateTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeClientEventResponseCreateType value) + { + return value switch + { + RealtimeClientEventResponseCreateType.ResponseCreate => "response.create", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeClientEventResponseCreateType? ToEnum(string value) + { + return value switch + { + "response.create" => RealtimeClientEventResponseCreateType.ResponseCreate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventSessionUpdate.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventSessionUpdate.g.cs index 30e6a4e8..33b41b5e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventSessionUpdate.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventSessionUpdate.g.cs @@ -4,7 +4,12 @@ namespace OpenAI { /// - /// Send this event to update the session’s default configuration. The client may send this event at any time to update the session configuration, and any field may be updated at any time, except for "voice". The server will respond with a `session.updated` event that shows the full effective configuration. Only fields that are present are updated, thus the correct way to clear a field like "instructions" is to pass an empty string. + /// Send this event to update the session’s default configuration. The client may
+ /// send this event at any time to update the session configuration, and any
+ /// field may be updated at any time, except for "voice". The server will respond
+ /// with a `session.updated` event that shows the full effective configuration.
+ /// Only fields that are present are updated, thus the correct way to clear a
+ /// field like "instructions" is to pass an empty string. ///
public sealed partial class RealtimeClientEventSessionUpdate { @@ -15,11 +20,11 @@ public sealed partial class RealtimeClientEventSessionUpdate public string? EventId { get; set; } /// - /// The event type, must be "session.update". + /// The event type, must be `session.update`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeClientEventSessionUpdateTypeJsonConverter))] + public global::OpenAI.RealtimeClientEventSessionUpdateType Type { get; set; } /// /// A session refers to a single WebSocket connection between a client and the server.
@@ -46,7 +51,7 @@ public sealed partial class RealtimeClientEventSessionUpdate /// Optional client-generated ID used to identify this event. /// /// - /// The event type, must be "session.update". + /// The event type, must be `session.update`. /// /// /// A session refers to a single WebSocket connection between a client and the server.
@@ -58,13 +63,13 @@ public sealed partial class RealtimeClientEventSessionUpdate /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeClientEventSessionUpdate( - string type, global::OpenAI.RealtimeSession session, - string? eventId) + string? eventId, + global::OpenAI.RealtimeClientEventSessionUpdateType type) { - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Session = session ?? throw new global::System.ArgumentNullException(nameof(session)); this.EventId = eventId; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventSessionUpdateType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventSessionUpdateType.g.cs new file mode 100644 index 00000000..98b8c8c8 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeClientEventSessionUpdateType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `session.update`. + /// + public enum RealtimeClientEventSessionUpdateType + { + /// + /// + /// + SessionUpdate, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeClientEventSessionUpdateTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeClientEventSessionUpdateType value) + { + return value switch + { + RealtimeClientEventSessionUpdateType.SessionUpdate => "session.update", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeClientEventSessionUpdateType? ToEnum(string value) + { + return value switch + { + "session.update" => RealtimeClientEventSessionUpdateType.SessionUpdate, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreated.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreated.g.cs index 58e79835..a4416976 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreated.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreated.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeServerEventConversationCreated public required string EventId { get; set; } /// - /// The event type, must be "conversation.created". + /// The event type, must be `conversation.created`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationCreatedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventConversationCreatedType Type { get; set; } /// /// The conversation resource. @@ -42,7 +42,7 @@ public sealed partial class RealtimeServerEventConversationCreated /// The unique ID of the server event. /// /// - /// The event type, must be "conversation.created". + /// The event type, must be `conversation.created`. /// /// /// The conversation resource. @@ -50,12 +50,12 @@ public sealed partial class RealtimeServerEventConversationCreated [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventConversationCreated( string eventId, - string type, - global::OpenAI.RealtimeServerEventConversationCreatedConversation conversation) + global::OpenAI.RealtimeServerEventConversationCreatedConversation conversation, + global::OpenAI.RealtimeServerEventConversationCreatedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Conversation = conversation ?? throw new global::System.ArgumentNullException(nameof(conversation)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreatedConversation.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreatedConversation.g.cs index 6aaa0f4a..94b96f60 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreatedConversation.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreatedConversation.g.cs @@ -15,7 +15,7 @@ public sealed partial class RealtimeServerEventConversationCreatedConversation public string? Id { get; set; } /// - /// The object type, must be "realtime.conversation". + /// The object type, must be `realtime.conversation`. /// [global::System.Text.Json.Serialization.JsonPropertyName("object")] public string? Object { get; set; } @@ -33,7 +33,7 @@ public sealed partial class RealtimeServerEventConversationCreatedConversation /// The unique ID of the conversation. /// /// - /// The object type, must be "realtime.conversation". + /// The object type, must be `realtime.conversation`. /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventConversationCreatedConversation( diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreatedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreatedType.g.cs new file mode 100644 index 00000000..62bcd124 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationCreatedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `conversation.created`. + /// + public enum RealtimeServerEventConversationCreatedType + { + /// + /// + /// + ConversationCreated, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventConversationCreatedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventConversationCreatedType value) + { + return value switch + { + RealtimeServerEventConversationCreatedType.ConversationCreated => "conversation.created", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventConversationCreatedType? ToEnum(string value) + { + return value switch + { + "conversation.created" => RealtimeServerEventConversationCreatedType.ConversationCreated, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemCreated.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemCreated.g.cs index 326723a6..79aaa174 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemCreated.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemCreated.g.cs @@ -4,10 +4,16 @@ namespace OpenAI { /// - /// Returned when a conversation item is created. There are several scenarios that produce this event:
- /// - The server is generating a Response, which if successful will produce either one or two Items, which will be of type `message` (role `assistant`) or type `function_call`.
- /// - The input audio buffer has been committed, either by the client or the server (in `server_vad` mode). The server will take the content of the input audio buffer and add it to a new user message Item.
- /// - The client has sent a `conversation.item.create` event to add a new Item to the Conversation. + /// Returned when a conversation item is created. There are several scenarios that
+ /// produce this event:
+ /// - The server is generating a Response, which if successful will produce
+ /// either one or two Items, which will be of type `message`
+ /// (role `assistant`) or type `function_call`.
+ /// - The input audio buffer has been committed, either by the client or the
+ /// server (in `server_vad` mode). The server will take the content of the
+ /// input audio buffer and add it to a new user message Item.
+ /// - The client has sent a `conversation.item.create` event to add a new Item
+ /// to the Conversation. ///
public sealed partial class RealtimeServerEventConversationItemCreated { @@ -22,11 +28,12 @@ public sealed partial class RealtimeServerEventConversationItemCreated /// The event type, must be `conversation.item.created`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemCreatedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventConversationItemCreatedType Type { get; set; } /// - /// The ID of the preceding item in the Conversation context, allows the client to understand the order of the conversation. + /// The ID of the preceding item in the Conversation context, allows the
+ /// client to understand the order of the conversation. ///
[global::System.Text.Json.Serialization.JsonPropertyName("previous_item_id")] [global::System.Text.Json.Serialization.JsonRequired] @@ -59,7 +66,8 @@ public sealed partial class RealtimeServerEventConversationItemCreated /// The event type, must be `conversation.item.created`. /// /// - /// The ID of the preceding item in the Conversation context, allows the client to understand the order of the conversation. + /// The ID of the preceding item in the Conversation context, allows the
+ /// client to understand the order of the conversation. /// /// /// A realtime Item is of three types: message, function_call, or function_call_output.
@@ -71,14 +79,14 @@ public sealed partial class RealtimeServerEventConversationItemCreated [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventConversationItemCreated( string eventId, - string type, string previousItemId, - global::OpenAI.RealtimeConversationItem item) + global::OpenAI.RealtimeConversationItem item, + global::OpenAI.RealtimeServerEventConversationItemCreatedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.PreviousItemId = previousItemId ?? throw new global::System.ArgumentNullException(nameof(previousItemId)); this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemCreatedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemCreatedType.g.cs new file mode 100644 index 00000000..82a1bfb8 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemCreatedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `conversation.item.created`. + /// + public enum RealtimeServerEventConversationItemCreatedType + { + /// + /// + /// + ConversationItemCreated, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventConversationItemCreatedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventConversationItemCreatedType value) + { + return value switch + { + RealtimeServerEventConversationItemCreatedType.ConversationItemCreated => "conversation.item.created", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventConversationItemCreatedType? ToEnum(string value) + { + return value switch + { + "conversation.item.created" => RealtimeServerEventConversationItemCreatedType.ConversationItemCreated, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemDeleted.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemDeleted.g.cs index 4b1249cf..b7cbf71a 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemDeleted.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemDeleted.g.cs @@ -4,7 +4,9 @@ namespace OpenAI { /// - /// Returned when an item in the conversation is deleted by the client with a `conversation.item.delete` event. This event is used to synchronize the server's understanding of the conversation history with the client's view. + /// Returned when an item in the conversation is deleted by the client with a
+ /// `conversation.item.delete` event. This event is used to synchronize the
+ /// server's understanding of the conversation history with the client's view. ///
public sealed partial class RealtimeServerEventConversationItemDeleted { @@ -19,8 +21,8 @@ public sealed partial class RealtimeServerEventConversationItemDeleted /// The event type, must be `conversation.item.deleted`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemDeletedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventConversationItemDeletedType Type { get; set; } /// /// The ID of the item that was deleted. @@ -50,12 +52,12 @@ public sealed partial class RealtimeServerEventConversationItemDeleted [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventConversationItemDeleted( string eventId, - string type, - string itemId) + string itemId, + global::OpenAI.RealtimeServerEventConversationItemDeletedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemDeletedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemDeletedType.g.cs new file mode 100644 index 00000000..34aa9803 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemDeletedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `conversation.item.deleted`. + /// + public enum RealtimeServerEventConversationItemDeletedType + { + /// + /// + /// + ConversationItemDeleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventConversationItemDeletedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventConversationItemDeletedType value) + { + return value switch + { + RealtimeServerEventConversationItemDeletedType.ConversationItemDeleted => "conversation.item.deleted", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventConversationItemDeletedType? ToEnum(string value) + { + return value switch + { + "conversation.item.deleted" => RealtimeServerEventConversationItemDeletedType.ConversationItemDeleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted.g.cs index d1a5b07f..2f493a08 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompleted.g.cs @@ -4,8 +4,15 @@ namespace OpenAI { /// - /// This event is the output of audio transcription for user audio written to the user audio buffer. Transcription begins when the input audio buffer is committed by the client or server (in `server_vad` mode). Transcription runs asynchronously with Response creation, so this event may come before or after the Response events.
- /// Realtime API models accept audio natively, and thus input transcription is a separate process run on a separate ASR (Automatic Speech Recognition) model, currently always `whisper-1`. Thus the transcript may diverge somewhat from the model's interpretation, and should be treated as a rough guide. + /// This event is the output of audio transcription for user audio written to the
+ /// user audio buffer. Transcription begins when the input audio buffer is
+ /// committed by the client or server (in `server_vad` mode). Transcription runs
+ /// asynchronously with Response creation, so this event may come before or after
+ /// the Response events.
+ /// Realtime API models accept audio natively, and thus input transcription is a
+ /// separate process run on a separate ASR (Automatic Speech Recognition) model,
+ /// currently always `whisper-1`. Thus the transcript may diverge somewhat from
+ /// the model's interpretation, and should be treated as a rough guide. ///
public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionCompleted { @@ -17,11 +24,12 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr public required string EventId { get; set; } /// - /// The event type, must be `conversation.item.input_audio_transcription.completed`. + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.completed`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType Type { get; set; } /// /// The ID of the user message item containing the audio. @@ -57,7 +65,8 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr /// The unique ID of the server event. /// /// - /// The event type, must be `conversation.item.input_audio_transcription.completed`. + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.completed`. /// /// /// The ID of the user message item containing the audio. @@ -71,16 +80,16 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventConversationItemInputAudioTranscriptionCompleted( string eventId, - string type, string itemId, int contentIndex, - string transcript) + string transcript, + global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.ContentIndex = contentIndex; this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.g.cs new file mode 100644 index 00000000..29fa7250 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.completed`. + ///
+ public enum RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType + { + /// + /// + /// + ConversationItemInputAudioTranscriptionCompleted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventConversationItemInputAudioTranscriptionCompletedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType value) + { + return value switch + { + RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.ConversationItemInputAudioTranscriptionCompleted => "conversation.item.input_audio_transcription.completed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType? ToEnum(string value) + { + return value switch + { + "conversation.item.input_audio_transcription.completed" => RealtimeServerEventConversationItemInputAudioTranscriptionCompletedType.ConversationItemInputAudioTranscriptionCompleted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailed.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailed.g.cs index b4ae40fa..d2eabb09 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailed.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailed.g.cs @@ -4,7 +4,9 @@ namespace OpenAI { /// - /// Returned when input audio transcription is configured, and a transcription request for a user message failed. These events are separate from other `error` events so that the client can identify the related Item. + /// Returned when input audio transcription is configured, and a transcription
+ /// request for a user message failed. These events are separate from other
+ /// `error` events so that the client can identify the related Item. ///
public sealed partial class RealtimeServerEventConversationItemInputAudioTranscriptionFailed { @@ -16,11 +18,12 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr public required string EventId { get; set; } /// - /// The event type, must be `conversation.item.input_audio_transcription.failed`. + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.failed`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType Type { get; set; } /// /// The ID of the user message item. @@ -56,7 +59,8 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr /// The unique ID of the server event. /// /// - /// The event type, must be `conversation.item.input_audio_transcription.failed`. + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.failed`. /// /// /// The ID of the user message item. @@ -70,16 +74,16 @@ public sealed partial class RealtimeServerEventConversationItemInputAudioTranscr [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventConversationItemInputAudioTranscriptionFailed( string eventId, - string type, string itemId, int contentIndex, - global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError error) + global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedError error, + global::OpenAI.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.ContentIndex = contentIndex; this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.g.cs new file mode 100644 index 00000000..5c89a0db --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be
+ /// `conversation.item.input_audio_transcription.failed`. + ///
+ public enum RealtimeServerEventConversationItemInputAudioTranscriptionFailedType + { + /// + /// + /// + ConversationItemInputAudioTranscriptionFailed, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventConversationItemInputAudioTranscriptionFailedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventConversationItemInputAudioTranscriptionFailedType value) + { + return value switch + { + RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.ConversationItemInputAudioTranscriptionFailed => "conversation.item.input_audio_transcription.failed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventConversationItemInputAudioTranscriptionFailedType? ToEnum(string value) + { + return value switch + { + "conversation.item.input_audio_transcription.failed" => RealtimeServerEventConversationItemInputAudioTranscriptionFailedType.ConversationItemInputAudioTranscriptionFailed, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemTruncated.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemTruncated.g.cs index bcfc2ffa..b5724d96 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemTruncated.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemTruncated.g.cs @@ -4,8 +4,11 @@ namespace OpenAI { /// - /// Returned when an earlier assistant audio message item is truncated by the client with a `conversation.item.truncate` event. This event is used to synchronize the server's understanding of the audio with the client's playback.
- /// This action will truncate the audio and remove the server-side text transcript to ensure there is no text in the context that hasn't been heard by the user. + /// Returned when an earlier assistant audio message item is truncated by the
+ /// client with a `conversation.item.truncate` event. This event is used to
+ /// synchronize the server's understanding of the audio with the client's playback.
+ /// This action will truncate the audio and remove the server-side text transcript
+ /// to ensure there is no text in the context that hasn't been heard by the user. ///
public sealed partial class RealtimeServerEventConversationItemTruncated { @@ -20,8 +23,8 @@ public sealed partial class RealtimeServerEventConversationItemTruncated /// The event type, must be `conversation.item.truncated`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventConversationItemTruncatedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventConversationItemTruncatedType Type { get; set; } /// /// The ID of the assistant message item that was truncated. @@ -71,16 +74,16 @@ public sealed partial class RealtimeServerEventConversationItemTruncated [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventConversationItemTruncated( string eventId, - string type, string itemId, int contentIndex, - int audioEndMs) + int audioEndMs, + global::OpenAI.RealtimeServerEventConversationItemTruncatedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.ContentIndex = contentIndex; this.AudioEndMs = audioEndMs; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemTruncatedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemTruncatedType.g.cs new file mode 100644 index 00000000..ec24a0fd --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventConversationItemTruncatedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `conversation.item.truncated`. + /// + public enum RealtimeServerEventConversationItemTruncatedType + { + /// + /// + /// + ConversationItemTruncated, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventConversationItemTruncatedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventConversationItemTruncatedType value) + { + return value switch + { + RealtimeServerEventConversationItemTruncatedType.ConversationItemTruncated => "conversation.item.truncated", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventConversationItemTruncatedType? ToEnum(string value) + { + return value switch + { + "conversation.item.truncated" => RealtimeServerEventConversationItemTruncatedType.ConversationItemTruncated, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventError.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventError.g.cs index 2ae1f52c..2a6386d5 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventError.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventError.g.cs @@ -4,7 +4,9 @@ namespace OpenAI { /// - /// Returned when an error occurs, which could be a client problem or a server problem. Most errors are recoverable and the session will stay open, we recommend to implementors to monitor and log error messages by default. + /// Returned when an error occurs, which could be a client problem or a server
+ /// problem. Most errors are recoverable and the session will stay open, we
+ /// recommend to implementors to monitor and log error messages by default. ///
public sealed partial class RealtimeServerEventError { @@ -16,11 +18,11 @@ public sealed partial class RealtimeServerEventError public required string EventId { get; set; } /// - /// The event type, must be "error". + /// The event type, must be `error`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventErrorTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventErrorType Type { get; set; } /// /// Details of the error. @@ -42,7 +44,7 @@ public sealed partial class RealtimeServerEventError /// The unique ID of the server event. /// /// - /// The event type, must be "error". + /// The event type, must be `error`. /// /// /// Details of the error. @@ -50,12 +52,12 @@ public sealed partial class RealtimeServerEventError [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventError( string eventId, - string type, - global::OpenAI.RealtimeServerEventErrorError error) + global::OpenAI.RealtimeServerEventErrorError error, + global::OpenAI.RealtimeServerEventErrorType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Error = error ?? throw new global::System.ArgumentNullException(nameof(error)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventErrorType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventErrorType.g.cs new file mode 100644 index 00000000..2c768fcf --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventErrorType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `error`. + /// + public enum RealtimeServerEventErrorType + { + /// + /// + /// + Error, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventErrorTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventErrorType value) + { + return value switch + { + RealtimeServerEventErrorType.Error => "error", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventErrorType? ToEnum(string value) + { + return value switch + { + "error" => RealtimeServerEventErrorType.Error, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCleared.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCleared.g.cs index 1b7248e2..2732769d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCleared.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCleared.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Returned when the input audio buffer is cleared by the client with a `input_audio_buffer.clear` event. + /// Returned when the input audio buffer is cleared by the client with a
+ /// `input_audio_buffer.clear` event. ///
public sealed partial class RealtimeServerEventInputAudioBufferCleared { @@ -19,8 +20,8 @@ public sealed partial class RealtimeServerEventInputAudioBufferCleared /// The event type, must be `input_audio_buffer.cleared`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferClearedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventInputAudioBufferClearedType Type { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -40,10 +41,10 @@ public sealed partial class RealtimeServerEventInputAudioBufferCleared [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventInputAudioBufferCleared( string eventId, - string type) + global::OpenAI.RealtimeServerEventInputAudioBufferClearedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferClearedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferClearedType.g.cs new file mode 100644 index 00000000..bafa9891 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferClearedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `input_audio_buffer.cleared`. + /// + public enum RealtimeServerEventInputAudioBufferClearedType + { + /// + /// + /// + InputAudioBufferCleared, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventInputAudioBufferClearedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventInputAudioBufferClearedType value) + { + return value switch + { + RealtimeServerEventInputAudioBufferClearedType.InputAudioBufferCleared => "input_audio_buffer.cleared", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventInputAudioBufferClearedType? ToEnum(string value) + { + return value switch + { + "input_audio_buffer.cleared" => RealtimeServerEventInputAudioBufferClearedType.InputAudioBufferCleared, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCommitted.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCommitted.g.cs index f5500e4b..6317415d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCommitted.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCommitted.g.cs @@ -4,7 +4,10 @@ namespace OpenAI { /// - /// Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. The `item_id` property is the ID of the user message item that will be created, thus a `conversation.item.created` event will also be sent to the client. + /// Returned when an input audio buffer is committed, either by the client or
+ /// automatically in server VAD mode. The `item_id` property is the ID of the user
+ /// message item that will be created, thus a `conversation.item.created` event
+ /// will also be sent to the client. ///
public sealed partial class RealtimeServerEventInputAudioBufferCommitted { @@ -19,8 +22,8 @@ public sealed partial class RealtimeServerEventInputAudioBufferCommitted /// The event type, must be `input_audio_buffer.committed`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferCommittedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventInputAudioBufferCommittedType Type { get; set; } /// /// The ID of the preceding item after which the new item will be inserted. @@ -60,14 +63,14 @@ public sealed partial class RealtimeServerEventInputAudioBufferCommitted [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventInputAudioBufferCommitted( string eventId, - string type, string previousItemId, - string itemId) + string itemId, + global::OpenAI.RealtimeServerEventInputAudioBufferCommittedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.PreviousItemId = previousItemId ?? throw new global::System.ArgumentNullException(nameof(previousItemId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedType.g.cs new file mode 100644 index 00000000..5f7e8bfe --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferCommittedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `input_audio_buffer.committed`. + /// + public enum RealtimeServerEventInputAudioBufferCommittedType + { + /// + /// + /// + InputAudioBufferCommitted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventInputAudioBufferCommittedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventInputAudioBufferCommittedType value) + { + return value switch + { + RealtimeServerEventInputAudioBufferCommittedType.InputAudioBufferCommitted => "input_audio_buffer.committed", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventInputAudioBufferCommittedType? ToEnum(string value) + { + return value switch + { + "input_audio_buffer.committed" => RealtimeServerEventInputAudioBufferCommittedType.InputAudioBufferCommitted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStarted.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStarted.g.cs index 97cb5cbf..328480b6 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStarted.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStarted.g.cs @@ -4,7 +4,15 @@ namespace OpenAI { /// - /// Sent by the server when in `server_vad` mode to indicate that speech has been detected in the audio buffer. This can happen any time audio is added to the buffer (unless speech is already detected). The client may want to use this event to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event when speech stops. The `item_id` property is the ID of the user message item that will be created when speech stops and will also be included in the `input_audio_buffer.speech_stopped` event (unless the client manually commits the audio buffer during VAD activation). + /// Sent by the server when in `server_vad` mode to indicate that speech has been
+ /// detected in the audio buffer. This can happen any time audio is added to the
+ /// buffer (unless speech is already detected). The client may want to use this
+ /// event to interrupt audio playback or provide visual feedback to the user.
+ /// The client should expect to receive a `input_audio_buffer.speech_stopped` event
+ /// when speech stops. The `item_id` property is the ID of the user message item
+ /// that will be created when speech stops and will also be included in the
+ /// `input_audio_buffer.speech_stopped` event (unless the client manually commits
+ /// the audio buffer during VAD activation). ///
public sealed partial class RealtimeServerEventInputAudioBufferSpeechStarted { @@ -19,11 +27,14 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStarted /// The event type, must be `input_audio_buffer.speech_started`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStartedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType Type { get; set; } /// - /// Milliseconds from the start of all audio written to the buffer during the session when speech was first detected. This will correspond to the beginning of audio sent to the model, and thus includes the `prefix_padding_ms` configured in the Session. + /// Milliseconds from the start of all audio written to the buffer during the
+ /// session when speech was first detected. This will correspond to the
+ /// beginning of audio sent to the model, and thus includes the
+ /// `prefix_padding_ms` configured in the Session. ///
[global::System.Text.Json.Serialization.JsonPropertyName("audio_start_ms")] [global::System.Text.Json.Serialization.JsonRequired] @@ -52,7 +63,10 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStarted /// The event type, must be `input_audio_buffer.speech_started`. /// /// - /// Milliseconds from the start of all audio written to the buffer during the session when speech was first detected. This will correspond to the beginning of audio sent to the model, and thus includes the `prefix_padding_ms` configured in the Session. + /// Milliseconds from the start of all audio written to the buffer during the
+ /// session when speech was first detected. This will correspond to the
+ /// beginning of audio sent to the model, and thus includes the
+ /// `prefix_padding_ms` configured in the Session. /// /// /// The ID of the user message item that will be created when speech stops. @@ -60,14 +74,14 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStarted [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventInputAudioBufferSpeechStarted( string eventId, - string type, int audioStartMs, - string itemId) + string itemId, + global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStartedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.AudioStartMs = audioStartMs; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStartedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStartedType.g.cs new file mode 100644 index 00000000..a9b4285c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStartedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `input_audio_buffer.speech_started`. + /// + public enum RealtimeServerEventInputAudioBufferSpeechStartedType + { + /// + /// + /// + InputAudioBufferSpeechStarted, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventInputAudioBufferSpeechStartedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventInputAudioBufferSpeechStartedType value) + { + return value switch + { + RealtimeServerEventInputAudioBufferSpeechStartedType.InputAudioBufferSpeechStarted => "input_audio_buffer.speech_started", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventInputAudioBufferSpeechStartedType? ToEnum(string value) + { + return value switch + { + "input_audio_buffer.speech_started" => RealtimeServerEventInputAudioBufferSpeechStartedType.InputAudioBufferSpeechStarted, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStopped.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStopped.g.cs index e85d062e..4cfa481d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStopped.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStopped.g.cs @@ -4,7 +4,9 @@ namespace OpenAI { /// - /// Returned in `server_vad` mode when the server detects the end of speech in the audio buffer. The server will also send an `conversation.item.created` event with the user message item that is created from the audio buffer. + /// Returned in `server_vad` mode when the server detects the end of speech in
+ /// the audio buffer. The server will also send an `conversation.item.created`
+ /// event with the user message item that is created from the audio buffer. ///
public sealed partial class RealtimeServerEventInputAudioBufferSpeechStopped { @@ -19,11 +21,13 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStopped /// The event type, must be `input_audio_buffer.speech_stopped`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventInputAudioBufferSpeechStoppedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType Type { get; set; } /// - /// Milliseconds since the session started when speech stopped. This will correspond to the end of audio sent to the model, and thus includes the `min_silence_duration_ms` configured in the Session. + /// Milliseconds since the session started when speech stopped. This will
+ /// correspond to the end of audio sent to the model, and thus includes the
+ /// `min_silence_duration_ms` configured in the Session. ///
[global::System.Text.Json.Serialization.JsonPropertyName("audio_end_ms")] [global::System.Text.Json.Serialization.JsonRequired] @@ -52,7 +56,9 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStopped /// The event type, must be `input_audio_buffer.speech_stopped`. /// /// - /// Milliseconds since the session started when speech stopped. This will correspond to the end of audio sent to the model, and thus includes the `min_silence_duration_ms` configured in the Session. + /// Milliseconds since the session started when speech stopped. This will
+ /// correspond to the end of audio sent to the model, and thus includes the
+ /// `min_silence_duration_ms` configured in the Session. /// /// /// The ID of the user message item that will be created. @@ -60,14 +66,14 @@ public sealed partial class RealtimeServerEventInputAudioBufferSpeechStopped [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventInputAudioBufferSpeechStopped( string eventId, - string type, int audioEndMs, - string itemId) + string itemId, + global::OpenAI.RealtimeServerEventInputAudioBufferSpeechStoppedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.AudioEndMs = audioEndMs; this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStoppedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStoppedType.g.cs new file mode 100644 index 00000000..6d4fec3e --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventInputAudioBufferSpeechStoppedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `input_audio_buffer.speech_stopped`. + /// + public enum RealtimeServerEventInputAudioBufferSpeechStoppedType + { + /// + /// + /// + InputAudioBufferSpeechStopped, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventInputAudioBufferSpeechStoppedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventInputAudioBufferSpeechStoppedType value) + { + return value switch + { + RealtimeServerEventInputAudioBufferSpeechStoppedType.InputAudioBufferSpeechStopped => "input_audio_buffer.speech_stopped", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventInputAudioBufferSpeechStoppedType? ToEnum(string value) + { + return value switch + { + "input_audio_buffer.speech_stopped" => RealtimeServerEventInputAudioBufferSpeechStoppedType.InputAudioBufferSpeechStopped, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventRateLimitsUpdated.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventRateLimitsUpdated.g.cs index 257b6d79..92d7515d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventRateLimitsUpdated.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventRateLimitsUpdated.g.cs @@ -4,7 +4,10 @@ namespace OpenAI { /// - /// Emitted at the beginning of a Response to indicate the updated rate limits. When a Response is created some tokens will be "reserved" for the output tokens, the rate limits shown here reflect that reservation, which is then adjusted accordingly once the Response is completed. + /// Emitted at the beginning of a Response to indicate the updated rate limits.
+ /// When a Response is created some tokens will be "reserved" for the output
+ /// tokens, the rate limits shown here reflect that reservation, which is then
+ /// adjusted accordingly once the Response is completed. ///
public sealed partial class RealtimeServerEventRateLimitsUpdated { @@ -19,8 +22,8 @@ public sealed partial class RealtimeServerEventRateLimitsUpdated /// The event type, must be `rate_limits.updated`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventRateLimitsUpdatedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventRateLimitsUpdatedType Type { get; set; } /// /// List of rate limit information. @@ -50,12 +53,12 @@ public sealed partial class RealtimeServerEventRateLimitsUpdated [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventRateLimitsUpdated( string eventId, - string type, - global::System.Collections.Generic.IList rateLimits) + global::System.Collections.Generic.IList rateLimits, + global::OpenAI.RealtimeServerEventRateLimitsUpdatedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.RateLimits = rateLimits ?? throw new global::System.ArgumentNullException(nameof(rateLimits)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventRateLimitsUpdatedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventRateLimitsUpdatedType.g.cs new file mode 100644 index 00000000..6c3cf0cd --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventRateLimitsUpdatedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `rate_limits.updated`. + /// + public enum RealtimeServerEventRateLimitsUpdatedType + { + /// + /// + /// + RateLimitsUpdated, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventRateLimitsUpdatedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventRateLimitsUpdatedType value) + { + return value switch + { + RealtimeServerEventRateLimitsUpdatedType.RateLimitsUpdated => "rate_limits.updated", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventRateLimitsUpdatedType? ToEnum(string value) + { + return value switch + { + "rate_limits.updated" => RealtimeServerEventRateLimitsUpdatedType.RateLimitsUpdated, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDelta.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDelta.g.cs index 4809fe9b..bf1e1890 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDelta.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDelta.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeServerEventResponseAudioDelta public required string EventId { get; set; } /// - /// The event type, must be "response.audio.delta". + /// The event type, must be `response.audio.delta`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioDeltaTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseAudioDeltaType Type { get; set; } /// /// The ID of the response. @@ -70,7 +70,7 @@ public sealed partial class RealtimeServerEventResponseAudioDelta /// The unique ID of the server event. /// /// - /// The event type, must be "response.audio.delta". + /// The event type, must be `response.audio.delta`. /// /// /// The ID of the response. @@ -90,20 +90,20 @@ public sealed partial class RealtimeServerEventResponseAudioDelta [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseAudioDelta( string eventId, - string type, string responseId, string itemId, int outputIndex, int contentIndex, - string delta) + string delta, + global::OpenAI.RealtimeServerEventResponseAudioDeltaType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.ContentIndex = contentIndex; this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDeltaType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDeltaType.g.cs new file mode 100644 index 00000000..6c74117a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDeltaType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.audio.delta`. + /// + public enum RealtimeServerEventResponseAudioDeltaType + { + /// + /// + /// + ResponseAudioDelta, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseAudioDeltaTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseAudioDeltaType value) + { + return value switch + { + RealtimeServerEventResponseAudioDeltaType.ResponseAudioDelta => "response.audio.delta", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseAudioDeltaType? ToEnum(string value) + { + return value switch + { + "response.audio.delta" => RealtimeServerEventResponseAudioDeltaType.ResponseAudioDelta, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDone.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDone.g.cs index 2e7c9bad..a33b9b04 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDone.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDone.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when the model-generated audio is done. Also emitted when a Response
+ /// is interrupted, incomplete, or cancelled. ///
public sealed partial class RealtimeServerEventResponseAudioDone { @@ -16,11 +17,11 @@ public sealed partial class RealtimeServerEventResponseAudioDone public required string EventId { get; set; } /// - /// The event type, must be "response.audio.done". + /// The event type, must be `response.audio.done`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioDoneTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseAudioDoneType Type { get; set; } /// /// The ID of the response. @@ -63,7 +64,7 @@ public sealed partial class RealtimeServerEventResponseAudioDone /// The unique ID of the server event. /// /// - /// The event type, must be "response.audio.done". + /// The event type, must be `response.audio.done`. /// /// /// The ID of the response. @@ -80,18 +81,18 @@ public sealed partial class RealtimeServerEventResponseAudioDone [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseAudioDone( string eventId, - string type, string responseId, string itemId, int outputIndex, - int contentIndex) + int contentIndex, + global::OpenAI.RealtimeServerEventResponseAudioDoneType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.ContentIndex = contentIndex; + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDoneType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDoneType.g.cs new file mode 100644 index 00000000..a0f1c8a7 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioDoneType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.audio.done`. + /// + public enum RealtimeServerEventResponseAudioDoneType + { + /// + /// + /// + ResponseAudioDone, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseAudioDoneTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseAudioDoneType value) + { + return value switch + { + RealtimeServerEventResponseAudioDoneType.ResponseAudioDone => "response.audio.done", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseAudioDoneType? ToEnum(string value) + { + return value switch + { + "response.audio.done" => RealtimeServerEventResponseAudioDoneType.ResponseAudioDone, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDelta.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDelta.g.cs index 343dd06a..769ac1b8 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDelta.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDelta.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDelta public required string EventId { get; set; } /// - /// The event type, must be "response.audio_transcript.delta". + /// The event type, must be `response.audio_transcript.delta`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDeltaTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType Type { get; set; } /// /// The ID of the response. @@ -70,7 +70,7 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDelta /// The unique ID of the server event. /// /// - /// The event type, must be "response.audio_transcript.delta". + /// The event type, must be `response.audio_transcript.delta`. /// /// /// The ID of the response. @@ -90,20 +90,20 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDelta [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseAudioTranscriptDelta( string eventId, - string type, string responseId, string itemId, int outputIndex, int contentIndex, - string delta) + string delta, + global::OpenAI.RealtimeServerEventResponseAudioTranscriptDeltaType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.ContentIndex = contentIndex; this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDeltaType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDeltaType.g.cs new file mode 100644 index 00000000..b36b8bec --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDeltaType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.audio_transcript.delta`. + /// + public enum RealtimeServerEventResponseAudioTranscriptDeltaType + { + /// + /// + /// + ResponseAudioTranscriptDelta, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseAudioTranscriptDeltaTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseAudioTranscriptDeltaType value) + { + return value switch + { + RealtimeServerEventResponseAudioTranscriptDeltaType.ResponseAudioTranscriptDelta => "response.audio_transcript.delta", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseAudioTranscriptDeltaType? ToEnum(string value) + { + return value switch + { + "response.audio_transcript.delta" => RealtimeServerEventResponseAudioTranscriptDeltaType.ResponseAudioTranscriptDelta, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDone.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDone.g.cs index a88ddb42..9277ebf2 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDone.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDone.g.cs @@ -4,7 +4,9 @@ namespace OpenAI { /// - /// Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when the model-generated transcription of audio output is done
+ /// streaming. Also emitted when a Response is interrupted, incomplete, or
+ /// cancelled. ///
public sealed partial class RealtimeServerEventResponseAudioTranscriptDone { @@ -16,11 +18,11 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDone public required string EventId { get; set; } /// - /// The event type, must be "response.audio_transcript.done". + /// The event type, must be `response.audio_transcript.done`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseAudioTranscriptDoneTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType Type { get; set; } /// /// The ID of the response. @@ -70,7 +72,7 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDone /// The unique ID of the server event. /// /// - /// The event type, must be "response.audio_transcript.done". + /// The event type, must be `response.audio_transcript.done`. /// /// /// The ID of the response. @@ -90,20 +92,20 @@ public sealed partial class RealtimeServerEventResponseAudioTranscriptDone [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseAudioTranscriptDone( string eventId, - string type, string responseId, string itemId, int outputIndex, int contentIndex, - string transcript) + string transcript, + global::OpenAI.RealtimeServerEventResponseAudioTranscriptDoneType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.ContentIndex = contentIndex; this.Transcript = transcript ?? throw new global::System.ArgumentNullException(nameof(transcript)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDoneType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDoneType.g.cs new file mode 100644 index 00000000..de0b0edb --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseAudioTranscriptDoneType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.audio_transcript.done`. + /// + public enum RealtimeServerEventResponseAudioTranscriptDoneType + { + /// + /// + /// + ResponseAudioTranscriptDone, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseAudioTranscriptDoneTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseAudioTranscriptDoneType value) + { + return value switch + { + RealtimeServerEventResponseAudioTranscriptDoneType.ResponseAudioTranscriptDone => "response.audio_transcript.done", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseAudioTranscriptDoneType? ToEnum(string value) + { + return value switch + { + "response.audio_transcript.done" => RealtimeServerEventResponseAudioTranscriptDoneType.ResponseAudioTranscriptDone, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAdded.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAdded.g.cs index b5d75a43..74d061c4 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAdded.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAdded.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Returned when a new content part is added to an assistant message item during response generation. + /// Returned when a new content part is added to an assistant message item during
+ /// response generation. ///
public sealed partial class RealtimeServerEventResponseContentPartAdded { @@ -16,11 +17,11 @@ public sealed partial class RealtimeServerEventResponseContentPartAdded public required string EventId { get; set; } /// - /// The event type, must be "response.content_part.added". + /// The event type, must be `response.content_part.added`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseContentPartAddedType Type { get; set; } /// /// The ID of the response. @@ -70,7 +71,7 @@ public sealed partial class RealtimeServerEventResponseContentPartAdded /// The unique ID of the server event. /// /// - /// The event type, must be "response.content_part.added". + /// The event type, must be `response.content_part.added`. /// /// /// The ID of the response. @@ -90,20 +91,20 @@ public sealed partial class RealtimeServerEventResponseContentPartAdded [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseContentPartAdded( string eventId, - string type, string responseId, string itemId, int outputIndex, int contentIndex, - global::OpenAI.RealtimeServerEventResponseContentPartAddedPart part) + global::OpenAI.RealtimeServerEventResponseContentPartAddedPart part, + global::OpenAI.RealtimeServerEventResponseContentPartAddedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.ContentIndex = contentIndex; this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedPart.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedPart.g.cs index 0c60cf9c..7ff67c43 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedPart.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedPart.g.cs @@ -12,7 +12,8 @@ public sealed partial class RealtimeServerEventResponseContentPartAddedPart /// The content type ("text", "audio"). /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - public string? Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseContentPartAddedPartTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseContentPartAddedPartType? Type { get; set; } /// /// The text content (if type is "text"). @@ -55,7 +56,7 @@ public sealed partial class RealtimeServerEventResponseContentPartAddedPart /// [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseContentPartAddedPart( - string? type, + global::OpenAI.RealtimeServerEventResponseContentPartAddedPartType? type, string? text, string? audio, string? transcript) diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedPartType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedPartType.g.cs new file mode 100644 index 00000000..bf548b4c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedPartType.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The content type ("text", "audio"). + /// + public enum RealtimeServerEventResponseContentPartAddedPartType + { + /// + /// + /// + Audio, + /// + /// + /// + Text, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseContentPartAddedPartTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseContentPartAddedPartType value) + { + return value switch + { + RealtimeServerEventResponseContentPartAddedPartType.Audio => "audio", + RealtimeServerEventResponseContentPartAddedPartType.Text => "text", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseContentPartAddedPartType? ToEnum(string value) + { + return value switch + { + "audio" => RealtimeServerEventResponseContentPartAddedPartType.Audio, + "text" => RealtimeServerEventResponseContentPartAddedPartType.Text, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedType.g.cs new file mode 100644 index 00000000..5e0ca55c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartAddedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.content_part.added`. + /// + public enum RealtimeServerEventResponseContentPartAddedType + { + /// + /// + /// + ResponseContentPartAdded, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseContentPartAddedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseContentPartAddedType value) + { + return value switch + { + RealtimeServerEventResponseContentPartAddedType.ResponseContentPartAdded => "response.content_part.added", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseContentPartAddedType? ToEnum(string value) + { + return value switch + { + "response.content_part.added" => RealtimeServerEventResponseContentPartAddedType.ResponseContentPartAdded, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartDone.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartDone.g.cs index 445b21be..9413e3be 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartDone.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartDone.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when a content part is done streaming in an assistant message item.
+ /// Also emitted when a Response is interrupted, incomplete, or cancelled. ///
public sealed partial class RealtimeServerEventResponseContentPartDone { @@ -16,11 +17,11 @@ public sealed partial class RealtimeServerEventResponseContentPartDone public required string EventId { get; set; } /// - /// The event type, must be "response.content_part.done". + /// The event type, must be `response.content_part.done`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseContentPartDoneTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseContentPartDoneType Type { get; set; } /// /// The ID of the response. @@ -70,7 +71,7 @@ public sealed partial class RealtimeServerEventResponseContentPartDone /// The unique ID of the server event. /// /// - /// The event type, must be "response.content_part.done". + /// The event type, must be `response.content_part.done`. /// /// /// The ID of the response. @@ -90,20 +91,20 @@ public sealed partial class RealtimeServerEventResponseContentPartDone [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseContentPartDone( string eventId, - string type, string responseId, string itemId, int outputIndex, int contentIndex, - global::OpenAI.RealtimeServerEventResponseContentPartDonePart part) + global::OpenAI.RealtimeServerEventResponseContentPartDonePart part, + global::OpenAI.RealtimeServerEventResponseContentPartDoneType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.ContentIndex = contentIndex; this.Part = part ?? throw new global::System.ArgumentNullException(nameof(part)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartDoneType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartDoneType.g.cs new file mode 100644 index 00000000..ae3ca4f5 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseContentPartDoneType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.content_part.done`. + /// + public enum RealtimeServerEventResponseContentPartDoneType + { + /// + /// + /// + ResponseContentPartDone, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseContentPartDoneTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseContentPartDoneType value) + { + return value switch + { + RealtimeServerEventResponseContentPartDoneType.ResponseContentPartDone => "response.content_part.done", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseContentPartDoneType? ToEnum(string value) + { + return value switch + { + "response.content_part.done" => RealtimeServerEventResponseContentPartDoneType.ResponseContentPartDone, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseCreated.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseCreated.g.cs index c16a1fba..c44525f0 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseCreated.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseCreated.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Returned when a new Response is created. The first event of response creation, where the response is in an initial state of `in_progress`. + /// Returned when a new Response is created. The first event of response creation,
+ /// where the response is in an initial state of `in_progress`. ///
public sealed partial class RealtimeServerEventResponseCreated { @@ -19,8 +20,8 @@ public sealed partial class RealtimeServerEventResponseCreated /// The event type, must be `response.created`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseCreatedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseCreatedType Type { get; set; } /// /// The response resource. @@ -50,12 +51,12 @@ public sealed partial class RealtimeServerEventResponseCreated [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseCreated( string eventId, - string type, - global::OpenAI.RealtimeResponse response) + global::OpenAI.RealtimeResponse response, + global::OpenAI.RealtimeServerEventResponseCreatedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseCreatedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseCreatedType.g.cs new file mode 100644 index 00000000..57f305dc --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseCreatedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.created`. + /// + public enum RealtimeServerEventResponseCreatedType + { + /// + /// + /// + ResponseCreated, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseCreatedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseCreatedType value) + { + return value switch + { + RealtimeServerEventResponseCreatedType.ResponseCreated => "response.created", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseCreatedType? ToEnum(string value) + { + return value switch + { + "response.created" => RealtimeServerEventResponseCreatedType.ResponseCreated, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseDone.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseDone.g.cs index a76f64a7..3ad7ff9d 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseDone.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseDone.g.cs @@ -4,7 +4,9 @@ namespace OpenAI { /// - /// Returned when a Response is done streaming. Always emitted, no matter the final state. The Response object included in the `response.done` event will include all output Items in the Response but will omit the raw audio data. + /// Returned when a Response is done streaming. Always emitted, no matter the
+ /// final state. The Response object included in the `response.done` event will
+ /// include all output Items in the Response but will omit the raw audio data. ///
public sealed partial class RealtimeServerEventResponseDone { @@ -16,11 +18,11 @@ public sealed partial class RealtimeServerEventResponseDone public required string EventId { get; set; } /// - /// The event type, must be "response.done". + /// The event type, must be `response.done`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseDoneTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseDoneType Type { get; set; } /// /// The response resource. @@ -42,7 +44,7 @@ public sealed partial class RealtimeServerEventResponseDone /// The unique ID of the server event. /// /// - /// The event type, must be "response.done". + /// The event type, must be `response.done`. /// /// /// The response resource. @@ -50,12 +52,12 @@ public sealed partial class RealtimeServerEventResponseDone [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseDone( string eventId, - string type, - global::OpenAI.RealtimeResponse response) + global::OpenAI.RealtimeResponse response, + global::OpenAI.RealtimeServerEventResponseDoneType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Response = response ?? throw new global::System.ArgumentNullException(nameof(response)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseDoneType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseDoneType.g.cs new file mode 100644 index 00000000..eccd27fb --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseDoneType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.done`. + /// + public enum RealtimeServerEventResponseDoneType + { + /// + /// + /// + ResponseDone, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseDoneTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseDoneType value) + { + return value switch + { + RealtimeServerEventResponseDoneType.ResponseDone => "response.done", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseDoneType? ToEnum(string value) + { + return value switch + { + "response.done" => RealtimeServerEventResponseDoneType.ResponseDone, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDelta.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDelta.g.cs index 123f927b..f0cd6628 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDelta.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDelta.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDelt public required string EventId { get; set; } /// - /// The event type, must be "response.function_call_arguments.delta". + /// The event type, must be `response.function_call_arguments.delta`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType Type { get; set; } /// /// The ID of the response. @@ -70,7 +70,7 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDelt /// The unique ID of the server event. /// /// - /// The event type, must be "response.function_call_arguments.delta". + /// The event type, must be `response.function_call_arguments.delta`. /// /// /// The ID of the response. @@ -90,20 +90,20 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDelt [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseFunctionCallArgumentsDelta( string eventId, - string type, string responseId, string itemId, int outputIndex, string callId, - string delta) + string delta, + global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDeltaType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDeltaType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDeltaType.g.cs new file mode 100644 index 00000000..a3df422c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDeltaType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.function_call_arguments.delta`. + /// + public enum RealtimeServerEventResponseFunctionCallArgumentsDeltaType + { + /// + /// + /// + ResponseFunctionCallArgumentsDelta, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseFunctionCallArgumentsDeltaTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseFunctionCallArgumentsDeltaType value) + { + return value switch + { + RealtimeServerEventResponseFunctionCallArgumentsDeltaType.ResponseFunctionCallArgumentsDelta => "response.function_call_arguments.delta", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseFunctionCallArgumentsDeltaType? ToEnum(string value) + { + return value switch + { + "response.function_call_arguments.delta" => RealtimeServerEventResponseFunctionCallArgumentsDeltaType.ResponseFunctionCallArgumentsDelta, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDone.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDone.g.cs index b18f5023..a855a65e 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDone.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDone.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when the model-generated function call arguments are done streaming.
+ /// Also emitted when a Response is interrupted, incomplete, or cancelled. ///
public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDone { @@ -16,11 +17,11 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDone public required string EventId { get; set; } /// - /// The event type, must be "response.function_call_arguments.done". + /// The event type, must be `response.function_call_arguments.done`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseFunctionCallArgumentsDoneTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType Type { get; set; } /// /// The ID of the response. @@ -70,7 +71,7 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDone /// The unique ID of the server event. /// /// - /// The event type, must be "response.function_call_arguments.done". + /// The event type, must be `response.function_call_arguments.done`. /// /// /// The ID of the response. @@ -90,20 +91,20 @@ public sealed partial class RealtimeServerEventResponseFunctionCallArgumentsDone [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseFunctionCallArgumentsDone( string eventId, - string type, string responseId, string itemId, int outputIndex, string callId, - string arguments) + string arguments, + global::OpenAI.RealtimeServerEventResponseFunctionCallArgumentsDoneType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); this.Arguments = arguments ?? throw new global::System.ArgumentNullException(nameof(arguments)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDoneType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDoneType.g.cs new file mode 100644 index 00000000..c66874be --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseFunctionCallArgumentsDoneType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.function_call_arguments.done`. + /// + public enum RealtimeServerEventResponseFunctionCallArgumentsDoneType + { + /// + /// + /// + ResponseFunctionCallArgumentsDone, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseFunctionCallArgumentsDoneTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseFunctionCallArgumentsDoneType value) + { + return value switch + { + RealtimeServerEventResponseFunctionCallArgumentsDoneType.ResponseFunctionCallArgumentsDone => "response.function_call_arguments.done", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseFunctionCallArgumentsDoneType? ToEnum(string value) + { + return value switch + { + "response.function_call_arguments.done" => RealtimeServerEventResponseFunctionCallArgumentsDoneType.ResponseFunctionCallArgumentsDone, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemAdded.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemAdded.g.cs index 44e69c9a..b4fc7bed 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemAdded.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemAdded.g.cs @@ -19,8 +19,8 @@ public sealed partial class RealtimeServerEventResponseOutputItemAdded /// The event type, must be `response.output_item.added`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemAddedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseOutputItemAddedType Type { get; set; } /// /// The ID of the Response to which the item belongs. @@ -78,16 +78,16 @@ public sealed partial class RealtimeServerEventResponseOutputItemAdded [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseOutputItemAdded( string eventId, - string type, string responseId, int outputIndex, - global::OpenAI.RealtimeConversationItem item) + global::OpenAI.RealtimeConversationItem item, + global::OpenAI.RealtimeServerEventResponseOutputItemAddedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.OutputIndex = outputIndex; this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemAddedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemAddedType.g.cs new file mode 100644 index 00000000..cb25483f --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemAddedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.output_item.added`. + /// + public enum RealtimeServerEventResponseOutputItemAddedType + { + /// + /// + /// + ResponseOutputItemAdded, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseOutputItemAddedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseOutputItemAddedType value) + { + return value switch + { + RealtimeServerEventResponseOutputItemAddedType.ResponseOutputItemAdded => "response.output_item.added", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseOutputItemAddedType? ToEnum(string value) + { + return value switch + { + "response.output_item.added" => RealtimeServerEventResponseOutputItemAddedType.ResponseOutputItemAdded, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemDone.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemDone.g.cs index 114d7761..55a569da 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemDone.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemDone.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when an Item is done streaming. Also emitted when a Response is
+ /// interrupted, incomplete, or cancelled. ///
public sealed partial class RealtimeServerEventResponseOutputItemDone { @@ -19,8 +20,8 @@ public sealed partial class RealtimeServerEventResponseOutputItemDone /// The event type, must be `response.output_item.done`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseOutputItemDoneTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseOutputItemDoneType Type { get; set; } /// /// The ID of the Response to which the item belongs. @@ -78,16 +79,16 @@ public sealed partial class RealtimeServerEventResponseOutputItemDone [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseOutputItemDone( string eventId, - string type, string responseId, int outputIndex, - global::OpenAI.RealtimeConversationItem item) + global::OpenAI.RealtimeConversationItem item, + global::OpenAI.RealtimeServerEventResponseOutputItemDoneType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.OutputIndex = outputIndex; this.Item = item ?? throw new global::System.ArgumentNullException(nameof(item)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemDoneType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemDoneType.g.cs new file mode 100644 index 00000000..10fa3a7c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseOutputItemDoneType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.output_item.done`. + /// + public enum RealtimeServerEventResponseOutputItemDoneType + { + /// + /// + /// + ResponseOutputItemDone, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseOutputItemDoneTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseOutputItemDoneType value) + { + return value switch + { + RealtimeServerEventResponseOutputItemDoneType.ResponseOutputItemDone => "response.output_item.done", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseOutputItemDoneType? ToEnum(string value) + { + return value switch + { + "response.output_item.done" => RealtimeServerEventResponseOutputItemDoneType.ResponseOutputItemDone, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDelta.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDelta.g.cs index a2e07a18..03dffab7 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDelta.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDelta.g.cs @@ -16,11 +16,11 @@ public sealed partial class RealtimeServerEventResponseTextDelta public required string EventId { get; set; } /// - /// The event type, must be "response.text.delta". + /// The event type, must be `response.text.delta`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseTextDeltaTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseTextDeltaType Type { get; set; } /// /// The ID of the response. @@ -70,7 +70,7 @@ public sealed partial class RealtimeServerEventResponseTextDelta /// The unique ID of the server event. /// /// - /// The event type, must be "response.text.delta". + /// The event type, must be `response.text.delta`. /// /// /// The ID of the response. @@ -90,20 +90,20 @@ public sealed partial class RealtimeServerEventResponseTextDelta [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseTextDelta( string eventId, - string type, string responseId, string itemId, int outputIndex, int contentIndex, - string delta) + string delta, + global::OpenAI.RealtimeServerEventResponseTextDeltaType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.ContentIndex = contentIndex; this.Delta = delta ?? throw new global::System.ArgumentNullException(nameof(delta)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDeltaType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDeltaType.g.cs new file mode 100644 index 00000000..af7d3c8d --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDeltaType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.text.delta`. + /// + public enum RealtimeServerEventResponseTextDeltaType + { + /// + /// + /// + ResponseTextDelta, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseTextDeltaTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseTextDeltaType value) + { + return value switch + { + RealtimeServerEventResponseTextDeltaType.ResponseTextDelta => "response.text.delta", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseTextDeltaType? ToEnum(string value) + { + return value switch + { + "response.text.delta" => RealtimeServerEventResponseTextDeltaType.ResponseTextDelta, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDone.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDone.g.cs index b9b0a5c6..b7f0d94c 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDone.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDone.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Returned when the text value of a "text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled. + /// Returned when the text value of a "text" content part is done streaming. Also
+ /// emitted when a Response is interrupted, incomplete, or cancelled. ///
public sealed partial class RealtimeServerEventResponseTextDone { @@ -16,11 +17,11 @@ public sealed partial class RealtimeServerEventResponseTextDone public required string EventId { get; set; } /// - /// The event type, must be "response.text.done". + /// The event type, must be `response.text.done`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventResponseTextDoneTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventResponseTextDoneType Type { get; set; } /// /// The ID of the response. @@ -70,7 +71,7 @@ public sealed partial class RealtimeServerEventResponseTextDone /// The unique ID of the server event. /// /// - /// The event type, must be "response.text.done". + /// The event type, must be `response.text.done`. /// /// /// The ID of the response. @@ -90,20 +91,20 @@ public sealed partial class RealtimeServerEventResponseTextDone [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventResponseTextDone( string eventId, - string type, string responseId, string itemId, int outputIndex, int contentIndex, - string text) + string text, + global::OpenAI.RealtimeServerEventResponseTextDoneType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.ResponseId = responseId ?? throw new global::System.ArgumentNullException(nameof(responseId)); this.ItemId = itemId ?? throw new global::System.ArgumentNullException(nameof(itemId)); this.OutputIndex = outputIndex; this.ContentIndex = contentIndex; this.Text = text ?? throw new global::System.ArgumentNullException(nameof(text)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDoneType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDoneType.g.cs new file mode 100644 index 00000000..6660116c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventResponseTextDoneType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `response.text.done`. + /// + public enum RealtimeServerEventResponseTextDoneType + { + /// + /// + /// + ResponseTextDone, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventResponseTextDoneTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventResponseTextDoneType value) + { + return value switch + { + RealtimeServerEventResponseTextDoneType.ResponseTextDone => "response.text.done", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventResponseTextDoneType? ToEnum(string value) + { + return value switch + { + "response.text.done" => RealtimeServerEventResponseTextDoneType.ResponseTextDone, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionCreated.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionCreated.g.cs index 1b6fb2b4..7d3fe210 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionCreated.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionCreated.g.cs @@ -4,7 +4,9 @@ namespace OpenAI { /// - /// Returned when a Session is created. Emitted automatically when a new connection is established as the first server event. This event will contain the default Session configuration. + /// Returned when a Session is created. Emitted automatically when a new
+ /// connection is established as the first server event. This event will contain
+ /// the default Session configuration. ///
public sealed partial class RealtimeServerEventSessionCreated { @@ -19,8 +21,8 @@ public sealed partial class RealtimeServerEventSessionCreated /// The event type, must be `session.created`. ///
[global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventSessionCreatedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventSessionCreatedType Type { get; set; } /// /// A session refers to a single WebSocket connection between a client and the server.
@@ -60,12 +62,12 @@ public sealed partial class RealtimeServerEventSessionCreated [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventSessionCreated( string eventId, - string type, - global::OpenAI.RealtimeSession session) + global::OpenAI.RealtimeSession session, + global::OpenAI.RealtimeServerEventSessionCreatedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Session = session ?? throw new global::System.ArgumentNullException(nameof(session)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionCreatedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionCreatedType.g.cs new file mode 100644 index 00000000..05733234 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionCreatedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `session.created`. + /// + public enum RealtimeServerEventSessionCreatedType + { + /// + /// + /// + SessionCreated, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventSessionCreatedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventSessionCreatedType value) + { + return value switch + { + RealtimeServerEventSessionCreatedType.SessionCreated => "session.created", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventSessionCreatedType? ToEnum(string value) + { + return value switch + { + "session.created" => RealtimeServerEventSessionCreatedType.SessionCreated, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionUpdated.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionUpdated.g.cs index 623fc263..a7573879 100644 --- a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionUpdated.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionUpdated.g.cs @@ -4,7 +4,8 @@ namespace OpenAI { /// - /// Returned when a session is updated with a `session.update` event, unless there is an error. + /// Returned when a session is updated with a `session.update` event, unless
+ /// there is an error. ///
public sealed partial class RealtimeServerEventSessionUpdated { @@ -16,11 +17,11 @@ public sealed partial class RealtimeServerEventSessionUpdated public required string EventId { get; set; } /// - /// The event type, must be "session.updated". + /// The event type, must be `session.updated`. /// [global::System.Text.Json.Serialization.JsonPropertyName("type")] - [global::System.Text.Json.Serialization.JsonRequired] - public required string Type { get; set; } + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.RealtimeServerEventSessionUpdatedTypeJsonConverter))] + public global::OpenAI.RealtimeServerEventSessionUpdatedType Type { get; set; } /// /// A session refers to a single WebSocket connection between a client and the server.
@@ -47,7 +48,7 @@ public sealed partial class RealtimeServerEventSessionUpdated /// The unique ID of the server event. /// /// - /// The event type, must be "session.updated". + /// The event type, must be `session.updated`. /// /// /// A session refers to a single WebSocket connection between a client and the server.
@@ -60,12 +61,12 @@ public sealed partial class RealtimeServerEventSessionUpdated [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] public RealtimeServerEventSessionUpdated( string eventId, - string type, - global::OpenAI.RealtimeSession session) + global::OpenAI.RealtimeSession session, + global::OpenAI.RealtimeServerEventSessionUpdatedType type) { this.EventId = eventId ?? throw new global::System.ArgumentNullException(nameof(eventId)); - this.Type = type ?? throw new global::System.ArgumentNullException(nameof(type)); this.Session = session ?? throw new global::System.ArgumentNullException(nameof(session)); + this.Type = type; } /// diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionUpdatedType.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionUpdatedType.g.cs new file mode 100644 index 00000000..6d413c2d --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.RealtimeServerEventSessionUpdatedType.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The event type, must be `session.updated`. + /// + public enum RealtimeServerEventSessionUpdatedType + { + /// + /// + /// + SessionUpdated, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class RealtimeServerEventSessionUpdatedTypeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this RealtimeServerEventSessionUpdatedType value) + { + return value switch + { + RealtimeServerEventSessionUpdatedType.SessionUpdated => "session.updated", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static RealtimeServerEventSessionUpdatedType? ToEnum(string value) + { + return value switch + { + "session.updated" => RealtimeServerEventSessionUpdatedType.SessionUpdated, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ResultItem.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ResultItem.Json.g.cs new file mode 100644 index 00000000..0c4f7007 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ResultItem.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public readonly partial struct ResultItem + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.ResultItem? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.ResultItem), + jsonSerializerContext) as global::OpenAI.ResultItem?; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.ResultItem? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.ResultItem), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.ResultItem?; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.ResultItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.ResultItem.g.cs new file mode 100644 index 00000000..34367073 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.ResultItem.g.cs @@ -0,0 +1,579 @@ +#pragma warning disable CS0618 // Type or member is obsolete + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public readonly partial struct ResultItem : global::System.IEquatable + { + /// + /// + /// + public global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject? Object { get; } + + /// + /// The aggregated completions usage details of the specific time bucket. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.UsageCompletionsResult? OrganizationUsageCompletionsResult { get; init; } +#else + public global::OpenAI.UsageCompletionsResult? OrganizationUsageCompletionsResult { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OrganizationUsageCompletionsResult))] +#endif + public bool IsOrganizationUsageCompletionsResult => OrganizationUsageCompletionsResult != null; + + /// + /// + /// + public static implicit operator ResultItem(global::OpenAI.UsageCompletionsResult value) => new ResultItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.UsageCompletionsResult?(ResultItem @this) => @this.OrganizationUsageCompletionsResult; + + /// + /// + /// + public ResultItem(global::OpenAI.UsageCompletionsResult? value) + { + OrganizationUsageCompletionsResult = value; + } + + /// + /// The aggregated embeddings usage details of the specific time bucket. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.UsageEmbeddingsResult? OrganizationUsageEmbeddingsResult { get; init; } +#else + public global::OpenAI.UsageEmbeddingsResult? OrganizationUsageEmbeddingsResult { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OrganizationUsageEmbeddingsResult))] +#endif + public bool IsOrganizationUsageEmbeddingsResult => OrganizationUsageEmbeddingsResult != null; + + /// + /// + /// + public static implicit operator ResultItem(global::OpenAI.UsageEmbeddingsResult value) => new ResultItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.UsageEmbeddingsResult?(ResultItem @this) => @this.OrganizationUsageEmbeddingsResult; + + /// + /// + /// + public ResultItem(global::OpenAI.UsageEmbeddingsResult? value) + { + OrganizationUsageEmbeddingsResult = value; + } + + /// + /// The aggregated moderations usage details of the specific time bucket. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.UsageModerationsResult? OrganizationUsageModerationsResult { get; init; } +#else + public global::OpenAI.UsageModerationsResult? OrganizationUsageModerationsResult { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OrganizationUsageModerationsResult))] +#endif + public bool IsOrganizationUsageModerationsResult => OrganizationUsageModerationsResult != null; + + /// + /// + /// + public static implicit operator ResultItem(global::OpenAI.UsageModerationsResult value) => new ResultItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.UsageModerationsResult?(ResultItem @this) => @this.OrganizationUsageModerationsResult; + + /// + /// + /// + public ResultItem(global::OpenAI.UsageModerationsResult? value) + { + OrganizationUsageModerationsResult = value; + } + + /// + /// The aggregated images usage details of the specific time bucket. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.UsageImagesResult? OrganizationUsageImagesResult { get; init; } +#else + public global::OpenAI.UsageImagesResult? OrganizationUsageImagesResult { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OrganizationUsageImagesResult))] +#endif + public bool IsOrganizationUsageImagesResult => OrganizationUsageImagesResult != null; + + /// + /// + /// + public static implicit operator ResultItem(global::OpenAI.UsageImagesResult value) => new ResultItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.UsageImagesResult?(ResultItem @this) => @this.OrganizationUsageImagesResult; + + /// + /// + /// + public ResultItem(global::OpenAI.UsageImagesResult? value) + { + OrganizationUsageImagesResult = value; + } + + /// + /// The aggregated audio speeches usage details of the specific time bucket. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.UsageAudioSpeechesResult? OrganizationUsageAudioSpeechesResult { get; init; } +#else + public global::OpenAI.UsageAudioSpeechesResult? OrganizationUsageAudioSpeechesResult { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OrganizationUsageAudioSpeechesResult))] +#endif + public bool IsOrganizationUsageAudioSpeechesResult => OrganizationUsageAudioSpeechesResult != null; + + /// + /// + /// + public static implicit operator ResultItem(global::OpenAI.UsageAudioSpeechesResult value) => new ResultItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.UsageAudioSpeechesResult?(ResultItem @this) => @this.OrganizationUsageAudioSpeechesResult; + + /// + /// + /// + public ResultItem(global::OpenAI.UsageAudioSpeechesResult? value) + { + OrganizationUsageAudioSpeechesResult = value; + } + + /// + /// The aggregated audio transcriptions usage details of the specific time bucket. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.UsageAudioTranscriptionsResult? OrganizationUsageAudioTranscriptionsResult { get; init; } +#else + public global::OpenAI.UsageAudioTranscriptionsResult? OrganizationUsageAudioTranscriptionsResult { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OrganizationUsageAudioTranscriptionsResult))] +#endif + public bool IsOrganizationUsageAudioTranscriptionsResult => OrganizationUsageAudioTranscriptionsResult != null; + + /// + /// + /// + public static implicit operator ResultItem(global::OpenAI.UsageAudioTranscriptionsResult value) => new ResultItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.UsageAudioTranscriptionsResult?(ResultItem @this) => @this.OrganizationUsageAudioTranscriptionsResult; + + /// + /// + /// + public ResultItem(global::OpenAI.UsageAudioTranscriptionsResult? value) + { + OrganizationUsageAudioTranscriptionsResult = value; + } + + /// + /// The aggregated vector stores usage details of the specific time bucket. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.UsageVectorStoresResult? OrganizationUsageVectorStoresResult { get; init; } +#else + public global::OpenAI.UsageVectorStoresResult? OrganizationUsageVectorStoresResult { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OrganizationUsageVectorStoresResult))] +#endif + public bool IsOrganizationUsageVectorStoresResult => OrganizationUsageVectorStoresResult != null; + + /// + /// + /// + public static implicit operator ResultItem(global::OpenAI.UsageVectorStoresResult value) => new ResultItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.UsageVectorStoresResult?(ResultItem @this) => @this.OrganizationUsageVectorStoresResult; + + /// + /// + /// + public ResultItem(global::OpenAI.UsageVectorStoresResult? value) + { + OrganizationUsageVectorStoresResult = value; + } + + /// + /// The aggregated code interpreter sessions usage details of the specific time bucket. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.UsageCodeInterpreterSessionsResult? OrganizationUsageCodeInterpreterSessionsResult { get; init; } +#else + public global::OpenAI.UsageCodeInterpreterSessionsResult? OrganizationUsageCodeInterpreterSessionsResult { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OrganizationUsageCodeInterpreterSessionsResult))] +#endif + public bool IsOrganizationUsageCodeInterpreterSessionsResult => OrganizationUsageCodeInterpreterSessionsResult != null; + + /// + /// + /// + public static implicit operator ResultItem(global::OpenAI.UsageCodeInterpreterSessionsResult value) => new ResultItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.UsageCodeInterpreterSessionsResult?(ResultItem @this) => @this.OrganizationUsageCodeInterpreterSessionsResult; + + /// + /// + /// + public ResultItem(global::OpenAI.UsageCodeInterpreterSessionsResult? value) + { + OrganizationUsageCodeInterpreterSessionsResult = value; + } + + /// + /// The aggregated costs details of the specific time bucket. + /// +#if NET6_0_OR_GREATER + public global::OpenAI.CostsResult? OrganizationCostsResult { get; init; } +#else + public global::OpenAI.CostsResult? OrganizationCostsResult { get; } +#endif + + /// + /// + /// +#if NET6_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.MemberNotNullWhen(true, nameof(OrganizationCostsResult))] +#endif + public bool IsOrganizationCostsResult => OrganizationCostsResult != null; + + /// + /// + /// + public static implicit operator ResultItem(global::OpenAI.CostsResult value) => new ResultItem(value); + + /// + /// + /// + public static implicit operator global::OpenAI.CostsResult?(ResultItem @this) => @this.OrganizationCostsResult; + + /// + /// + /// + public ResultItem(global::OpenAI.CostsResult? value) + { + OrganizationCostsResult = value; + } + + /// + /// + /// + public ResultItem( + global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject? object, + global::OpenAI.UsageCompletionsResult? organizationUsageCompletionsResult, + global::OpenAI.UsageEmbeddingsResult? organizationUsageEmbeddingsResult, + global::OpenAI.UsageModerationsResult? organizationUsageModerationsResult, + global::OpenAI.UsageImagesResult? organizationUsageImagesResult, + global::OpenAI.UsageAudioSpeechesResult? organizationUsageAudioSpeechesResult, + global::OpenAI.UsageAudioTranscriptionsResult? organizationUsageAudioTranscriptionsResult, + global::OpenAI.UsageVectorStoresResult? organizationUsageVectorStoresResult, + global::OpenAI.UsageCodeInterpreterSessionsResult? organizationUsageCodeInterpreterSessionsResult, + global::OpenAI.CostsResult? organizationCostsResult + ) + { + Object = object; + + OrganizationUsageCompletionsResult = organizationUsageCompletionsResult; + OrganizationUsageEmbeddingsResult = organizationUsageEmbeddingsResult; + OrganizationUsageModerationsResult = organizationUsageModerationsResult; + OrganizationUsageImagesResult = organizationUsageImagesResult; + OrganizationUsageAudioSpeechesResult = organizationUsageAudioSpeechesResult; + OrganizationUsageAudioTranscriptionsResult = organizationUsageAudioTranscriptionsResult; + OrganizationUsageVectorStoresResult = organizationUsageVectorStoresResult; + OrganizationUsageCodeInterpreterSessionsResult = organizationUsageCodeInterpreterSessionsResult; + OrganizationCostsResult = organizationCostsResult; + } + + /// + /// + /// + public object? Object => + OrganizationCostsResult as object ?? + OrganizationUsageCodeInterpreterSessionsResult as object ?? + OrganizationUsageVectorStoresResult as object ?? + OrganizationUsageAudioTranscriptionsResult as object ?? + OrganizationUsageAudioSpeechesResult as object ?? + OrganizationUsageImagesResult as object ?? + OrganizationUsageModerationsResult as object ?? + OrganizationUsageEmbeddingsResult as object ?? + OrganizationUsageCompletionsResult as object + ; + + /// + /// + /// + public bool Validate() + { + return IsOrganizationUsageCompletionsResult && !IsOrganizationUsageEmbeddingsResult && !IsOrganizationUsageModerationsResult && !IsOrganizationUsageImagesResult && !IsOrganizationUsageAudioSpeechesResult && !IsOrganizationUsageAudioTranscriptionsResult && !IsOrganizationUsageVectorStoresResult && !IsOrganizationUsageCodeInterpreterSessionsResult && !IsOrganizationCostsResult || !IsOrganizationUsageCompletionsResult && IsOrganizationUsageEmbeddingsResult && !IsOrganizationUsageModerationsResult && !IsOrganizationUsageImagesResult && !IsOrganizationUsageAudioSpeechesResult && !IsOrganizationUsageAudioTranscriptionsResult && !IsOrganizationUsageVectorStoresResult && !IsOrganizationUsageCodeInterpreterSessionsResult && !IsOrganizationCostsResult || !IsOrganizationUsageCompletionsResult && !IsOrganizationUsageEmbeddingsResult && IsOrganizationUsageModerationsResult && !IsOrganizationUsageImagesResult && !IsOrganizationUsageAudioSpeechesResult && !IsOrganizationUsageAudioTranscriptionsResult && !IsOrganizationUsageVectorStoresResult && !IsOrganizationUsageCodeInterpreterSessionsResult && !IsOrganizationCostsResult || !IsOrganizationUsageCompletionsResult && !IsOrganizationUsageEmbeddingsResult && !IsOrganizationUsageModerationsResult && IsOrganizationUsageImagesResult && !IsOrganizationUsageAudioSpeechesResult && !IsOrganizationUsageAudioTranscriptionsResult && !IsOrganizationUsageVectorStoresResult && !IsOrganizationUsageCodeInterpreterSessionsResult && !IsOrganizationCostsResult || !IsOrganizationUsageCompletionsResult && !IsOrganizationUsageEmbeddingsResult && !IsOrganizationUsageModerationsResult && !IsOrganizationUsageImagesResult && IsOrganizationUsageAudioSpeechesResult && !IsOrganizationUsageAudioTranscriptionsResult && !IsOrganizationUsageVectorStoresResult && !IsOrganizationUsageCodeInterpreterSessionsResult && !IsOrganizationCostsResult || !IsOrganizationUsageCompletionsResult && !IsOrganizationUsageEmbeddingsResult && !IsOrganizationUsageModerationsResult && !IsOrganizationUsageImagesResult && !IsOrganizationUsageAudioSpeechesResult && IsOrganizationUsageAudioTranscriptionsResult && !IsOrganizationUsageVectorStoresResult && !IsOrganizationUsageCodeInterpreterSessionsResult && !IsOrganizationCostsResult || !IsOrganizationUsageCompletionsResult && !IsOrganizationUsageEmbeddingsResult && !IsOrganizationUsageModerationsResult && !IsOrganizationUsageImagesResult && !IsOrganizationUsageAudioSpeechesResult && !IsOrganizationUsageAudioTranscriptionsResult && IsOrganizationUsageVectorStoresResult && !IsOrganizationUsageCodeInterpreterSessionsResult && !IsOrganizationCostsResult || !IsOrganizationUsageCompletionsResult && !IsOrganizationUsageEmbeddingsResult && !IsOrganizationUsageModerationsResult && !IsOrganizationUsageImagesResult && !IsOrganizationUsageAudioSpeechesResult && !IsOrganizationUsageAudioTranscriptionsResult && !IsOrganizationUsageVectorStoresResult && IsOrganizationUsageCodeInterpreterSessionsResult && !IsOrganizationCostsResult || !IsOrganizationUsageCompletionsResult && !IsOrganizationUsageEmbeddingsResult && !IsOrganizationUsageModerationsResult && !IsOrganizationUsageImagesResult && !IsOrganizationUsageAudioSpeechesResult && !IsOrganizationUsageAudioTranscriptionsResult && !IsOrganizationUsageVectorStoresResult && !IsOrganizationUsageCodeInterpreterSessionsResult && IsOrganizationCostsResult; + } + + /// + /// + /// + public TResult? Match( + global::System.Func? organizationUsageCompletionsResult = null, + global::System.Func? organizationUsageEmbeddingsResult = null, + global::System.Func? organizationUsageModerationsResult = null, + global::System.Func? organizationUsageImagesResult = null, + global::System.Func? organizationUsageAudioSpeechesResult = null, + global::System.Func? organizationUsageAudioTranscriptionsResult = null, + global::System.Func? organizationUsageVectorStoresResult = null, + global::System.Func? organizationUsageCodeInterpreterSessionsResult = null, + global::System.Func? organizationCostsResult = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsOrganizationUsageCompletionsResult && organizationUsageCompletionsResult != null) + { + return organizationUsageCompletionsResult(OrganizationUsageCompletionsResult!); + } + else if (IsOrganizationUsageEmbeddingsResult && organizationUsageEmbeddingsResult != null) + { + return organizationUsageEmbeddingsResult(OrganizationUsageEmbeddingsResult!); + } + else if (IsOrganizationUsageModerationsResult && organizationUsageModerationsResult != null) + { + return organizationUsageModerationsResult(OrganizationUsageModerationsResult!); + } + else if (IsOrganizationUsageImagesResult && organizationUsageImagesResult != null) + { + return organizationUsageImagesResult(OrganizationUsageImagesResult!); + } + else if (IsOrganizationUsageAudioSpeechesResult && organizationUsageAudioSpeechesResult != null) + { + return organizationUsageAudioSpeechesResult(OrganizationUsageAudioSpeechesResult!); + } + else if (IsOrganizationUsageAudioTranscriptionsResult && organizationUsageAudioTranscriptionsResult != null) + { + return organizationUsageAudioTranscriptionsResult(OrganizationUsageAudioTranscriptionsResult!); + } + else if (IsOrganizationUsageVectorStoresResult && organizationUsageVectorStoresResult != null) + { + return organizationUsageVectorStoresResult(OrganizationUsageVectorStoresResult!); + } + else if (IsOrganizationUsageCodeInterpreterSessionsResult && organizationUsageCodeInterpreterSessionsResult != null) + { + return organizationUsageCodeInterpreterSessionsResult(OrganizationUsageCodeInterpreterSessionsResult!); + } + else if (IsOrganizationCostsResult && organizationCostsResult != null) + { + return organizationCostsResult(OrganizationCostsResult!); + } + + return default(TResult); + } + + /// + /// + /// + public void Match( + global::System.Action? organizationUsageCompletionsResult = null, + global::System.Action? organizationUsageEmbeddingsResult = null, + global::System.Action? organizationUsageModerationsResult = null, + global::System.Action? organizationUsageImagesResult = null, + global::System.Action? organizationUsageAudioSpeechesResult = null, + global::System.Action? organizationUsageAudioTranscriptionsResult = null, + global::System.Action? organizationUsageVectorStoresResult = null, + global::System.Action? organizationUsageCodeInterpreterSessionsResult = null, + global::System.Action? organizationCostsResult = null, + bool validate = true) + { + if (validate) + { + Validate(); + } + + if (IsOrganizationUsageCompletionsResult) + { + organizationUsageCompletionsResult?.Invoke(OrganizationUsageCompletionsResult!); + } + else if (IsOrganizationUsageEmbeddingsResult) + { + organizationUsageEmbeddingsResult?.Invoke(OrganizationUsageEmbeddingsResult!); + } + else if (IsOrganizationUsageModerationsResult) + { + organizationUsageModerationsResult?.Invoke(OrganizationUsageModerationsResult!); + } + else if (IsOrganizationUsageImagesResult) + { + organizationUsageImagesResult?.Invoke(OrganizationUsageImagesResult!); + } + else if (IsOrganizationUsageAudioSpeechesResult) + { + organizationUsageAudioSpeechesResult?.Invoke(OrganizationUsageAudioSpeechesResult!); + } + else if (IsOrganizationUsageAudioTranscriptionsResult) + { + organizationUsageAudioTranscriptionsResult?.Invoke(OrganizationUsageAudioTranscriptionsResult!); + } + else if (IsOrganizationUsageVectorStoresResult) + { + organizationUsageVectorStoresResult?.Invoke(OrganizationUsageVectorStoresResult!); + } + else if (IsOrganizationUsageCodeInterpreterSessionsResult) + { + organizationUsageCodeInterpreterSessionsResult?.Invoke(OrganizationUsageCodeInterpreterSessionsResult!); + } + else if (IsOrganizationCostsResult) + { + organizationCostsResult?.Invoke(OrganizationCostsResult!); + } + } + + /// + /// + /// + public override int GetHashCode() + { + var fields = new object?[] + { + OrganizationUsageCompletionsResult, + typeof(global::OpenAI.UsageCompletionsResult), + OrganizationUsageEmbeddingsResult, + typeof(global::OpenAI.UsageEmbeddingsResult), + OrganizationUsageModerationsResult, + typeof(global::OpenAI.UsageModerationsResult), + OrganizationUsageImagesResult, + typeof(global::OpenAI.UsageImagesResult), + OrganizationUsageAudioSpeechesResult, + typeof(global::OpenAI.UsageAudioSpeechesResult), + OrganizationUsageAudioTranscriptionsResult, + typeof(global::OpenAI.UsageAudioTranscriptionsResult), + OrganizationUsageVectorStoresResult, + typeof(global::OpenAI.UsageVectorStoresResult), + OrganizationUsageCodeInterpreterSessionsResult, + typeof(global::OpenAI.UsageCodeInterpreterSessionsResult), + OrganizationCostsResult, + typeof(global::OpenAI.CostsResult), + }; + const int offset = unchecked((int)2166136261); + const int prime = 16777619; + static int HashCodeAggregator(int hashCode, object? value) => value == null + ? (hashCode ^ 0) * prime + : (hashCode ^ value.GetHashCode()) * prime; + + return global::System.Linq.Enumerable.Aggregate(fields, offset, HashCodeAggregator); + } + + /// + /// + /// + public bool Equals(ResultItem other) + { + return + global::System.Collections.Generic.EqualityComparer.Default.Equals(OrganizationUsageCompletionsResult, other.OrganizationUsageCompletionsResult) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OrganizationUsageEmbeddingsResult, other.OrganizationUsageEmbeddingsResult) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OrganizationUsageModerationsResult, other.OrganizationUsageModerationsResult) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OrganizationUsageImagesResult, other.OrganizationUsageImagesResult) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OrganizationUsageAudioSpeechesResult, other.OrganizationUsageAudioSpeechesResult) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OrganizationUsageAudioTranscriptionsResult, other.OrganizationUsageAudioTranscriptionsResult) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OrganizationUsageVectorStoresResult, other.OrganizationUsageVectorStoresResult) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OrganizationUsageCodeInterpreterSessionsResult, other.OrganizationUsageCodeInterpreterSessionsResult) && + global::System.Collections.Generic.EqualityComparer.Default.Equals(OrganizationCostsResult, other.OrganizationCostsResult) + ; + } + + /// + /// + /// + public static bool operator ==(ResultItem obj1, ResultItem obj2) + { + return global::System.Collections.Generic.EqualityComparer.Default.Equals(obj1, obj2); + } + + /// + /// + /// + public static bool operator !=(ResultItem obj1, ResultItem obj2) + { + return !(obj1 == obj2); + } + + /// + /// + /// + public override bool Equals(object? obj) + { + return obj is ResultItem o && Equals(o); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesBucketWidth.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesBucketWidth.g.cs new file mode 100644 index 00000000..3a9c2892 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesBucketWidth.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// Default Value: 1d + /// + public enum UsageAudioSpeechesBucketWidth + { + /// + /// + /// + x1m, + /// + /// + /// + x1h, + /// + /// + /// + x1d, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageAudioSpeechesBucketWidthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageAudioSpeechesBucketWidth value) + { + return value switch + { + UsageAudioSpeechesBucketWidth.x1m => "1m", + UsageAudioSpeechesBucketWidth.x1h => "1h", + UsageAudioSpeechesBucketWidth.x1d => "1d", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageAudioSpeechesBucketWidth? ToEnum(string value) + { + return value switch + { + "1m" => UsageAudioSpeechesBucketWidth.x1m, + "1h" => UsageAudioSpeechesBucketWidth.x1h, + "1d" => UsageAudioSpeechesBucketWidth.x1d, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesGroupByItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesGroupByItem.g.cs new file mode 100644 index 00000000..0b99f880 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesGroupByItem.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageAudioSpeechesGroupByItem + { + /// + /// + /// + ProjectId, + /// + /// + /// + UserId, + /// + /// + /// + ApiKeyId, + /// + /// + /// + Model, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageAudioSpeechesGroupByItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageAudioSpeechesGroupByItem value) + { + return value switch + { + UsageAudioSpeechesGroupByItem.ProjectId => "project_id", + UsageAudioSpeechesGroupByItem.UserId => "user_id", + UsageAudioSpeechesGroupByItem.ApiKeyId => "api_key_id", + UsageAudioSpeechesGroupByItem.Model => "model", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageAudioSpeechesGroupByItem? ToEnum(string value) + { + return value switch + { + "project_id" => UsageAudioSpeechesGroupByItem.ProjectId, + "user_id" => UsageAudioSpeechesGroupByItem.UserId, + "api_key_id" => UsageAudioSpeechesGroupByItem.ApiKeyId, + "model" => UsageAudioSpeechesGroupByItem.Model, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResult.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResult.Json.g.cs new file mode 100644 index 00000000..3a68143b --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageAudioSpeechesResult + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageAudioSpeechesResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageAudioSpeechesResult), + jsonSerializerContext) as global::OpenAI.UsageAudioSpeechesResult; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageAudioSpeechesResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageAudioSpeechesResult), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageAudioSpeechesResult; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResult.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResult.g.cs new file mode 100644 index 00000000..961851ce --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResult.g.cs @@ -0,0 +1,110 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The aggregated audio speeches usage details of the specific time bucket. + /// + public sealed partial class UsageAudioSpeechesResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageAudioSpeechesResultObjectJsonConverter))] + public global::OpenAI.UsageAudioSpeechesResultObject Object { get; set; } + + /// + /// The number of characters processed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("characters")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Characters { get; set; } + + /// + /// The count of requests made to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_model_requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int NumModelRequests { get; set; } + + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } + + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The number of characters processed. + /// + /// + /// The count of requests made to the model. + /// + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageAudioSpeechesResult( + int characters, + int numModelRequests, + global::OpenAI.UsageAudioSpeechesResultObject @object, + string? projectId, + string? userId, + string? apiKeyId, + string? model) + { + this.Characters = characters; + this.NumModelRequests = numModelRequests; + this.Object = @object; + this.ProjectId = projectId; + this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageAudioSpeechesResult() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResultObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResultObject.g.cs new file mode 100644 index 00000000..c586210d --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioSpeechesResultObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageAudioSpeechesResultObject + { + /// + /// + /// + OrganizationUsageAudioSpeechesResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageAudioSpeechesResultObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageAudioSpeechesResultObject value) + { + return value switch + { + UsageAudioSpeechesResultObject.OrganizationUsageAudioSpeechesResult => "organization.usage.audio_speeches.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageAudioSpeechesResultObject? ToEnum(string value) + { + return value switch + { + "organization.usage.audio_speeches.result" => UsageAudioSpeechesResultObject.OrganizationUsageAudioSpeechesResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsBucketWidth.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsBucketWidth.g.cs new file mode 100644 index 00000000..129744c5 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsBucketWidth.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// Default Value: 1d + /// + public enum UsageAudioTranscriptionsBucketWidth + { + /// + /// + /// + x1m, + /// + /// + /// + x1h, + /// + /// + /// + x1d, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageAudioTranscriptionsBucketWidthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageAudioTranscriptionsBucketWidth value) + { + return value switch + { + UsageAudioTranscriptionsBucketWidth.x1m => "1m", + UsageAudioTranscriptionsBucketWidth.x1h => "1h", + UsageAudioTranscriptionsBucketWidth.x1d => "1d", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageAudioTranscriptionsBucketWidth? ToEnum(string value) + { + return value switch + { + "1m" => UsageAudioTranscriptionsBucketWidth.x1m, + "1h" => UsageAudioTranscriptionsBucketWidth.x1h, + "1d" => UsageAudioTranscriptionsBucketWidth.x1d, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsGroupByItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsGroupByItem.g.cs new file mode 100644 index 00000000..18198aac --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsGroupByItem.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageAudioTranscriptionsGroupByItem + { + /// + /// + /// + ProjectId, + /// + /// + /// + UserId, + /// + /// + /// + ApiKeyId, + /// + /// + /// + Model, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageAudioTranscriptionsGroupByItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageAudioTranscriptionsGroupByItem value) + { + return value switch + { + UsageAudioTranscriptionsGroupByItem.ProjectId => "project_id", + UsageAudioTranscriptionsGroupByItem.UserId => "user_id", + UsageAudioTranscriptionsGroupByItem.ApiKeyId => "api_key_id", + UsageAudioTranscriptionsGroupByItem.Model => "model", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageAudioTranscriptionsGroupByItem? ToEnum(string value) + { + return value switch + { + "project_id" => UsageAudioTranscriptionsGroupByItem.ProjectId, + "user_id" => UsageAudioTranscriptionsGroupByItem.UserId, + "api_key_id" => UsageAudioTranscriptionsGroupByItem.ApiKeyId, + "model" => UsageAudioTranscriptionsGroupByItem.Model, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResult.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResult.Json.g.cs new file mode 100644 index 00000000..7746ebde --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageAudioTranscriptionsResult + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageAudioTranscriptionsResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageAudioTranscriptionsResult), + jsonSerializerContext) as global::OpenAI.UsageAudioTranscriptionsResult; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageAudioTranscriptionsResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageAudioTranscriptionsResult), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageAudioTranscriptionsResult; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResult.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResult.g.cs new file mode 100644 index 00000000..82f9d02a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResult.g.cs @@ -0,0 +1,110 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The aggregated audio transcriptions usage details of the specific time bucket. + /// + public sealed partial class UsageAudioTranscriptionsResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageAudioTranscriptionsResultObjectJsonConverter))] + public global::OpenAI.UsageAudioTranscriptionsResultObject Object { get; set; } + + /// + /// The number of seconds processed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("seconds")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Seconds { get; set; } + + /// + /// The count of requests made to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_model_requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int NumModelRequests { get; set; } + + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } + + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The number of seconds processed. + /// + /// + /// The count of requests made to the model. + /// + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageAudioTranscriptionsResult( + int seconds, + int numModelRequests, + global::OpenAI.UsageAudioTranscriptionsResultObject @object, + string? projectId, + string? userId, + string? apiKeyId, + string? model) + { + this.Seconds = seconds; + this.NumModelRequests = numModelRequests; + this.Object = @object; + this.ProjectId = projectId; + this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageAudioTranscriptionsResult() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResultObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResultObject.g.cs new file mode 100644 index 00000000..ddd6559b --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageAudioTranscriptionsResultObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageAudioTranscriptionsResultObject + { + /// + /// + /// + OrganizationUsageAudioTranscriptionsResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageAudioTranscriptionsResultObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageAudioTranscriptionsResultObject value) + { + return value switch + { + UsageAudioTranscriptionsResultObject.OrganizationUsageAudioTranscriptionsResult => "organization.usage.audio_transcriptions.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageAudioTranscriptionsResultObject? ToEnum(string value) + { + return value switch + { + "organization.usage.audio_transcriptions.result" => UsageAudioTranscriptionsResultObject.OrganizationUsageAudioTranscriptionsResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsBucketWidth.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsBucketWidth.g.cs new file mode 100644 index 00000000..77e10d89 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsBucketWidth.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// Default Value: 1d + /// + public enum UsageCodeInterpreterSessionsBucketWidth + { + /// + /// + /// + x1m, + /// + /// + /// + x1h, + /// + /// + /// + x1d, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageCodeInterpreterSessionsBucketWidthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageCodeInterpreterSessionsBucketWidth value) + { + return value switch + { + UsageCodeInterpreterSessionsBucketWidth.x1m => "1m", + UsageCodeInterpreterSessionsBucketWidth.x1h => "1h", + UsageCodeInterpreterSessionsBucketWidth.x1d => "1d", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageCodeInterpreterSessionsBucketWidth? ToEnum(string value) + { + return value switch + { + "1m" => UsageCodeInterpreterSessionsBucketWidth.x1m, + "1h" => UsageCodeInterpreterSessionsBucketWidth.x1h, + "1d" => UsageCodeInterpreterSessionsBucketWidth.x1d, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsGroupByItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsGroupByItem.g.cs new file mode 100644 index 00000000..64e406d7 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsGroupByItem.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageCodeInterpreterSessionsGroupByItem + { + /// + /// + /// + ProjectId, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageCodeInterpreterSessionsGroupByItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageCodeInterpreterSessionsGroupByItem value) + { + return value switch + { + UsageCodeInterpreterSessionsGroupByItem.ProjectId => "project_id", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageCodeInterpreterSessionsGroupByItem? ToEnum(string value) + { + return value switch + { + "project_id" => UsageCodeInterpreterSessionsGroupByItem.ProjectId, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResult.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResult.Json.g.cs new file mode 100644 index 00000000..454354d4 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageCodeInterpreterSessionsResult + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageCodeInterpreterSessionsResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageCodeInterpreterSessionsResult), + jsonSerializerContext) as global::OpenAI.UsageCodeInterpreterSessionsResult; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageCodeInterpreterSessionsResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageCodeInterpreterSessionsResult), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageCodeInterpreterSessionsResult; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResult.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResult.g.cs new file mode 100644 index 00000000..0926caac --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResult.g.cs @@ -0,0 +1,65 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The aggregated code interpreter sessions usage details of the specific time bucket. + /// + public sealed partial class UsageCodeInterpreterSessionsResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageCodeInterpreterSessionsResultObjectJsonConverter))] + public global::OpenAI.UsageCodeInterpreterSessionsResultObject Object { get; set; } + + /// + /// The number of code interpreter sessions. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("sessions")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Sessions { get; set; } + + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The number of code interpreter sessions. + /// + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageCodeInterpreterSessionsResult( + int sessions, + global::OpenAI.UsageCodeInterpreterSessionsResultObject @object, + string? projectId) + { + this.Sessions = sessions; + this.Object = @object; + this.ProjectId = projectId; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageCodeInterpreterSessionsResult() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResultObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResultObject.g.cs new file mode 100644 index 00000000..441f2f96 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCodeInterpreterSessionsResultObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageCodeInterpreterSessionsResultObject + { + /// + /// + /// + OrganizationUsageCodeInterpreterSessionsResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageCodeInterpreterSessionsResultObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageCodeInterpreterSessionsResultObject value) + { + return value switch + { + UsageCodeInterpreterSessionsResultObject.OrganizationUsageCodeInterpreterSessionsResult => "organization.usage.code_interpreter_sessions.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageCodeInterpreterSessionsResultObject? ToEnum(string value) + { + return value switch + { + "organization.usage.code_interpreter_sessions.result" => UsageCodeInterpreterSessionsResultObject.OrganizationUsageCodeInterpreterSessionsResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsBucketWidth.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsBucketWidth.g.cs new file mode 100644 index 00000000..9be8bc67 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsBucketWidth.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// Default Value: 1d + /// + public enum UsageCompletionsBucketWidth + { + /// + /// + /// + x1m, + /// + /// + /// + x1h, + /// + /// + /// + x1d, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageCompletionsBucketWidthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageCompletionsBucketWidth value) + { + return value switch + { + UsageCompletionsBucketWidth.x1m => "1m", + UsageCompletionsBucketWidth.x1h => "1h", + UsageCompletionsBucketWidth.x1d => "1d", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageCompletionsBucketWidth? ToEnum(string value) + { + return value switch + { + "1m" => UsageCompletionsBucketWidth.x1m, + "1h" => UsageCompletionsBucketWidth.x1h, + "1d" => UsageCompletionsBucketWidth.x1d, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsGroupByItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsGroupByItem.g.cs new file mode 100644 index 00000000..253b4aaf --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsGroupByItem.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageCompletionsGroupByItem + { + /// + /// + /// + ProjectId, + /// + /// + /// + UserId, + /// + /// + /// + ApiKeyId, + /// + /// + /// + Model, + /// + /// + /// + Batch, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageCompletionsGroupByItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageCompletionsGroupByItem value) + { + return value switch + { + UsageCompletionsGroupByItem.ProjectId => "project_id", + UsageCompletionsGroupByItem.UserId => "user_id", + UsageCompletionsGroupByItem.ApiKeyId => "api_key_id", + UsageCompletionsGroupByItem.Model => "model", + UsageCompletionsGroupByItem.Batch => "batch", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageCompletionsGroupByItem? ToEnum(string value) + { + return value switch + { + "project_id" => UsageCompletionsGroupByItem.ProjectId, + "user_id" => UsageCompletionsGroupByItem.UserId, + "api_key_id" => UsageCompletionsGroupByItem.ApiKeyId, + "model" => UsageCompletionsGroupByItem.Model, + "batch" => UsageCompletionsGroupByItem.Batch, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResult.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResult.Json.g.cs new file mode 100644 index 00000000..fb4bb6c4 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageCompletionsResult + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageCompletionsResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageCompletionsResult), + jsonSerializerContext) as global::OpenAI.UsageCompletionsResult; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageCompletionsResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageCompletionsResult), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageCompletionsResult; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResult.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResult.g.cs new file mode 100644 index 00000000..6ecbfc15 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResult.g.cs @@ -0,0 +1,144 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The aggregated completions usage details of the specific time bucket. + /// + public sealed partial class UsageCompletionsResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageCompletionsResultObjectJsonConverter))] + public global::OpenAI.UsageCompletionsResultObject Object { get; set; } + + /// + /// The number of input tokens used. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int InputTokens { get; set; } + + /// + /// The number of input tokens that has been cached from previous requests. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_cached_tokens")] + public int? InputCachedTokens { get; set; } + + /// + /// The number of output tokens used. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("output_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int OutputTokens { get; set; } + + /// + /// The count of requests made to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_model_requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int NumModelRequests { get; set; } + + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } + + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// When `group_by=batch`, this field tells whether the grouped usage result is batch or not. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("batch")] + public bool? Batch { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The number of input tokens used. + /// + /// + /// The number of input tokens that has been cached from previous requests. + /// + /// + /// The number of output tokens used. + /// + /// + /// The count of requests made to the model. + /// + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + /// + /// When `group_by=batch`, this field tells whether the grouped usage result is batch or not. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageCompletionsResult( + int inputTokens, + int outputTokens, + int numModelRequests, + global::OpenAI.UsageCompletionsResultObject @object, + int? inputCachedTokens, + string? projectId, + string? userId, + string? apiKeyId, + string? model, + bool? batch) + { + this.InputTokens = inputTokens; + this.OutputTokens = outputTokens; + this.NumModelRequests = numModelRequests; + this.Object = @object; + this.InputCachedTokens = inputCachedTokens; + this.ProjectId = projectId; + this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; + this.Batch = batch; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageCompletionsResult() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResultObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResultObject.g.cs new file mode 100644 index 00000000..d1fec18c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCompletionsResultObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageCompletionsResultObject + { + /// + /// + /// + OrganizationUsageCompletionsResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageCompletionsResultObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageCompletionsResultObject value) + { + return value switch + { + UsageCompletionsResultObject.OrganizationUsageCompletionsResult => "organization.usage.completions.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageCompletionsResultObject? ToEnum(string value) + { + return value switch + { + "organization.usage.completions.result" => UsageCompletionsResultObject.OrganizationUsageCompletionsResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCostsBucketWidth.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCostsBucketWidth.g.cs new file mode 100644 index 00000000..a7abe070 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCostsBucketWidth.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// Default Value: 1d + /// + public enum UsageCostsBucketWidth + { + /// + /// + /// + x1d, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageCostsBucketWidthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageCostsBucketWidth value) + { + return value switch + { + UsageCostsBucketWidth.x1d => "1d", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageCostsBucketWidth? ToEnum(string value) + { + return value switch + { + "1d" => UsageCostsBucketWidth.x1d, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageCostsGroupByItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCostsGroupByItem.g.cs new file mode 100644 index 00000000..cf3a014f --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageCostsGroupByItem.g.cs @@ -0,0 +1,51 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageCostsGroupByItem + { + /// + /// + /// + ProjectId, + /// + /// + /// + LineItem, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageCostsGroupByItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageCostsGroupByItem value) + { + return value switch + { + UsageCostsGroupByItem.ProjectId => "project_id", + UsageCostsGroupByItem.LineItem => "line_item", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageCostsGroupByItem? ToEnum(string value) + { + return value switch + { + "project_id" => UsageCostsGroupByItem.ProjectId, + "line_item" => UsageCostsGroupByItem.LineItem, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsBucketWidth.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsBucketWidth.g.cs new file mode 100644 index 00000000..6092d1de --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsBucketWidth.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// Default Value: 1d + /// + public enum UsageEmbeddingsBucketWidth + { + /// + /// + /// + x1m, + /// + /// + /// + x1h, + /// + /// + /// + x1d, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageEmbeddingsBucketWidthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageEmbeddingsBucketWidth value) + { + return value switch + { + UsageEmbeddingsBucketWidth.x1m => "1m", + UsageEmbeddingsBucketWidth.x1h => "1h", + UsageEmbeddingsBucketWidth.x1d => "1d", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageEmbeddingsBucketWidth? ToEnum(string value) + { + return value switch + { + "1m" => UsageEmbeddingsBucketWidth.x1m, + "1h" => UsageEmbeddingsBucketWidth.x1h, + "1d" => UsageEmbeddingsBucketWidth.x1d, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsGroupByItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsGroupByItem.g.cs new file mode 100644 index 00000000..5ff40c23 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsGroupByItem.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageEmbeddingsGroupByItem + { + /// + /// + /// + ProjectId, + /// + /// + /// + UserId, + /// + /// + /// + ApiKeyId, + /// + /// + /// + Model, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageEmbeddingsGroupByItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageEmbeddingsGroupByItem value) + { + return value switch + { + UsageEmbeddingsGroupByItem.ProjectId => "project_id", + UsageEmbeddingsGroupByItem.UserId => "user_id", + UsageEmbeddingsGroupByItem.ApiKeyId => "api_key_id", + UsageEmbeddingsGroupByItem.Model => "model", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageEmbeddingsGroupByItem? ToEnum(string value) + { + return value switch + { + "project_id" => UsageEmbeddingsGroupByItem.ProjectId, + "user_id" => UsageEmbeddingsGroupByItem.UserId, + "api_key_id" => UsageEmbeddingsGroupByItem.ApiKeyId, + "model" => UsageEmbeddingsGroupByItem.Model, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResult.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResult.Json.g.cs new file mode 100644 index 00000000..2f2fb8fc --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageEmbeddingsResult + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageEmbeddingsResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageEmbeddingsResult), + jsonSerializerContext) as global::OpenAI.UsageEmbeddingsResult; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageEmbeddingsResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageEmbeddingsResult), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageEmbeddingsResult; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResult.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResult.g.cs new file mode 100644 index 00000000..10418a74 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResult.g.cs @@ -0,0 +1,110 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The aggregated embeddings usage details of the specific time bucket. + /// + public sealed partial class UsageEmbeddingsResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageEmbeddingsResultObjectJsonConverter))] + public global::OpenAI.UsageEmbeddingsResultObject Object { get; set; } + + /// + /// The number of input tokens used. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int InputTokens { get; set; } + + /// + /// The count of requests made to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_model_requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int NumModelRequests { get; set; } + + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } + + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The number of input tokens used. + /// + /// + /// The count of requests made to the model. + /// + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageEmbeddingsResult( + int inputTokens, + int numModelRequests, + global::OpenAI.UsageEmbeddingsResultObject @object, + string? projectId, + string? userId, + string? apiKeyId, + string? model) + { + this.InputTokens = inputTokens; + this.NumModelRequests = numModelRequests; + this.Object = @object; + this.ProjectId = projectId; + this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageEmbeddingsResult() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResultObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResultObject.g.cs new file mode 100644 index 00000000..6109b3fa --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageEmbeddingsResultObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageEmbeddingsResultObject + { + /// + /// + /// + OrganizationUsageEmbeddingsResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageEmbeddingsResultObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageEmbeddingsResultObject value) + { + return value switch + { + UsageEmbeddingsResultObject.OrganizationUsageEmbeddingsResult => "organization.usage.embeddings.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageEmbeddingsResultObject? ToEnum(string value) + { + return value switch + { + "organization.usage.embeddings.result" => UsageEmbeddingsResultObject.OrganizationUsageEmbeddingsResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesBucketWidth.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesBucketWidth.g.cs new file mode 100644 index 00000000..0c3dad6b --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesBucketWidth.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// Default Value: 1d + /// + public enum UsageImagesBucketWidth + { + /// + /// + /// + x1m, + /// + /// + /// + x1h, + /// + /// + /// + x1d, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageImagesBucketWidthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageImagesBucketWidth value) + { + return value switch + { + UsageImagesBucketWidth.x1m => "1m", + UsageImagesBucketWidth.x1h => "1h", + UsageImagesBucketWidth.x1d => "1d", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageImagesBucketWidth? ToEnum(string value) + { + return value switch + { + "1m" => UsageImagesBucketWidth.x1m, + "1h" => UsageImagesBucketWidth.x1h, + "1d" => UsageImagesBucketWidth.x1d, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesGroupByItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesGroupByItem.g.cs new file mode 100644 index 00000000..34fab229 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesGroupByItem.g.cs @@ -0,0 +1,75 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageImagesGroupByItem + { + /// + /// + /// + ProjectId, + /// + /// + /// + UserId, + /// + /// + /// + ApiKeyId, + /// + /// + /// + Model, + /// + /// + /// + Size, + /// + /// + /// + Source, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageImagesGroupByItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageImagesGroupByItem value) + { + return value switch + { + UsageImagesGroupByItem.ProjectId => "project_id", + UsageImagesGroupByItem.UserId => "user_id", + UsageImagesGroupByItem.ApiKeyId => "api_key_id", + UsageImagesGroupByItem.Model => "model", + UsageImagesGroupByItem.Size => "size", + UsageImagesGroupByItem.Source => "source", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageImagesGroupByItem? ToEnum(string value) + { + return value switch + { + "project_id" => UsageImagesGroupByItem.ProjectId, + "user_id" => UsageImagesGroupByItem.UserId, + "api_key_id" => UsageImagesGroupByItem.ApiKeyId, + "model" => UsageImagesGroupByItem.Model, + "size" => UsageImagesGroupByItem.Size, + "source" => UsageImagesGroupByItem.Source, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResult.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResult.Json.g.cs new file mode 100644 index 00000000..7b9ac588 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageImagesResult + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageImagesResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageImagesResult), + jsonSerializerContext) as global::OpenAI.UsageImagesResult; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageImagesResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageImagesResult), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageImagesResult; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResult.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResult.g.cs new file mode 100644 index 00000000..e41dcdc0 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResult.g.cs @@ -0,0 +1,132 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The aggregated images usage details of the specific time bucket. + /// + public sealed partial class UsageImagesResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageImagesResultObjectJsonConverter))] + public global::OpenAI.UsageImagesResultObject Object { get; set; } + + /// + /// The number of images processed. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("images")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int Images { get; set; } + + /// + /// The count of requests made to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_model_requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int NumModelRequests { get; set; } + + /// + /// When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + public string? Source { get; set; } + + /// + /// When `group_by=size`, this field provides the image size of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("size")] + public string? Size { get; set; } + + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } + + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The number of images processed. + /// + /// + /// The count of requests made to the model. + /// + /// + /// When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`. + /// + /// + /// When `group_by=size`, this field provides the image size of the grouped usage result. + /// + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageImagesResult( + int images, + int numModelRequests, + global::OpenAI.UsageImagesResultObject @object, + string? source, + string? size, + string? projectId, + string? userId, + string? apiKeyId, + string? model) + { + this.Images = images; + this.NumModelRequests = numModelRequests; + this.Object = @object; + this.Source = source; + this.Size = size; + this.ProjectId = projectId; + this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageImagesResult() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResultObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResultObject.g.cs new file mode 100644 index 00000000..f8809a40 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesResultObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageImagesResultObject + { + /// + /// + /// + OrganizationUsageImagesResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageImagesResultObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageImagesResultObject value) + { + return value switch + { + UsageImagesResultObject.OrganizationUsageImagesResult => "organization.usage.images.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageImagesResultObject? ToEnum(string value) + { + return value switch + { + "organization.usage.images.result" => UsageImagesResultObject.OrganizationUsageImagesResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesSize.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesSize.g.cs new file mode 100644 index 00000000..c608fac6 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesSize.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageImagesSize + { + /// + /// + /// + x256x256, + /// + /// + /// + x512x512, + /// + /// + /// + x1024x1024, + /// + /// + /// + x1792x1792, + /// + /// + /// + x1024x1792, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageImagesSizeExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageImagesSize value) + { + return value switch + { + UsageImagesSize.x256x256 => "256x256", + UsageImagesSize.x512x512 => "512x512", + UsageImagesSize.x1024x1024 => "1024x1024", + UsageImagesSize.x1792x1792 => "1792x1792", + UsageImagesSize.x1024x1792 => "1024x1792", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageImagesSize? ToEnum(string value) + { + return value switch + { + "256x256" => UsageImagesSize.x256x256, + "512x512" => UsageImagesSize.x512x512, + "1024x1024" => UsageImagesSize.x1024x1024, + "1792x1792" => UsageImagesSize.x1792x1792, + "1024x1792" => UsageImagesSize.x1024x1792, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesSource.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesSource.g.cs new file mode 100644 index 00000000..72c6c8c2 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageImagesSource.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageImagesSource + { + /// + /// + /// + ImageGeneration, + /// + /// + /// + ImageEdit, + /// + /// + /// + ImageVariation, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageImagesSourceExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageImagesSource value) + { + return value switch + { + UsageImagesSource.ImageGeneration => "image.generation", + UsageImagesSource.ImageEdit => "image.edit", + UsageImagesSource.ImageVariation => "image.variation", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageImagesSource? ToEnum(string value) + { + return value switch + { + "image.generation" => UsageImagesSource.ImageGeneration, + "image.edit" => UsageImagesSource.ImageEdit, + "image.variation" => UsageImagesSource.ImageVariation, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsBucketWidth.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsBucketWidth.g.cs new file mode 100644 index 00000000..0396ddec --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsBucketWidth.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// Default Value: 1d + /// + public enum UsageModerationsBucketWidth + { + /// + /// + /// + x1m, + /// + /// + /// + x1h, + /// + /// + /// + x1d, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageModerationsBucketWidthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageModerationsBucketWidth value) + { + return value switch + { + UsageModerationsBucketWidth.x1m => "1m", + UsageModerationsBucketWidth.x1h => "1h", + UsageModerationsBucketWidth.x1d => "1d", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageModerationsBucketWidth? ToEnum(string value) + { + return value switch + { + "1m" => UsageModerationsBucketWidth.x1m, + "1h" => UsageModerationsBucketWidth.x1h, + "1d" => UsageModerationsBucketWidth.x1d, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsGroupByItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsGroupByItem.g.cs new file mode 100644 index 00000000..6abe0358 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsGroupByItem.g.cs @@ -0,0 +1,63 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageModerationsGroupByItem + { + /// + /// + /// + ProjectId, + /// + /// + /// + UserId, + /// + /// + /// + ApiKeyId, + /// + /// + /// + Model, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageModerationsGroupByItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageModerationsGroupByItem value) + { + return value switch + { + UsageModerationsGroupByItem.ProjectId => "project_id", + UsageModerationsGroupByItem.UserId => "user_id", + UsageModerationsGroupByItem.ApiKeyId => "api_key_id", + UsageModerationsGroupByItem.Model => "model", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageModerationsGroupByItem? ToEnum(string value) + { + return value switch + { + "project_id" => UsageModerationsGroupByItem.ProjectId, + "user_id" => UsageModerationsGroupByItem.UserId, + "api_key_id" => UsageModerationsGroupByItem.ApiKeyId, + "model" => UsageModerationsGroupByItem.Model, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResult.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResult.Json.g.cs new file mode 100644 index 00000000..00e96193 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageModerationsResult + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageModerationsResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageModerationsResult), + jsonSerializerContext) as global::OpenAI.UsageModerationsResult; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageModerationsResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageModerationsResult), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageModerationsResult; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResult.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResult.g.cs new file mode 100644 index 00000000..893b55c6 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResult.g.cs @@ -0,0 +1,110 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The aggregated moderations usage details of the specific time bucket. + /// + public sealed partial class UsageModerationsResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageModerationsResultObjectJsonConverter))] + public global::OpenAI.UsageModerationsResultObject Object { get; set; } + + /// + /// The number of input tokens used. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("input_tokens")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int InputTokens { get; set; } + + /// + /// The count of requests made to the model. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("num_model_requests")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int NumModelRequests { get; set; } + + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("user_id")] + public string? UserId { get; set; } + + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("api_key_id")] + public string? ApiKeyId { get; set; } + + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("model")] + public string? Model { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The number of input tokens used. + /// + /// + /// The count of requests made to the model. + /// + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + /// + /// When `group_by=user_id`, this field provides the user ID of the grouped usage result. + /// + /// + /// When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result. + /// + /// + /// When `group_by=model`, this field provides the model name of the grouped usage result. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageModerationsResult( + int inputTokens, + int numModelRequests, + global::OpenAI.UsageModerationsResultObject @object, + string? projectId, + string? userId, + string? apiKeyId, + string? model) + { + this.InputTokens = inputTokens; + this.NumModelRequests = numModelRequests; + this.Object = @object; + this.ProjectId = projectId; + this.UserId = userId; + this.ApiKeyId = apiKeyId; + this.Model = model; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageModerationsResult() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResultObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResultObject.g.cs new file mode 100644 index 00000000..461976be --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageModerationsResultObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageModerationsResultObject + { + /// + /// + /// + OrganizationUsageModerationsResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageModerationsResultObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageModerationsResultObject value) + { + return value switch + { + UsageModerationsResultObject.OrganizationUsageModerationsResult => "organization.usage.moderations.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageModerationsResultObject? ToEnum(string value) + { + return value switch + { + "organization.usage.moderations.result" => UsageModerationsResultObject.OrganizationUsageModerationsResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageResponse.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageResponse.Json.g.cs new file mode 100644 index 00000000..820b612a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageResponse), + jsonSerializerContext) as global::OpenAI.UsageResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageResponse.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageResponse.g.cs new file mode 100644 index 00000000..f94b1a20 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageResponse.g.cs @@ -0,0 +1,72 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class UsageResponse + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageResponseObjectJsonConverter))] + public global::OpenAI.UsageResponseObject Object { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("data")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Data { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("has_more")] + [global::System.Text.Json.Serialization.JsonRequired] + public required bool HasMore { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("next_page")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string NextPage { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageResponse( + global::System.Collections.Generic.IList data, + bool hasMore, + string nextPage, + global::OpenAI.UsageResponseObject @object) + { + this.Data = data ?? throw new global::System.ArgumentNullException(nameof(data)); + this.HasMore = hasMore; + this.NextPage = nextPage ?? throw new global::System.ArgumentNullException(nameof(nextPage)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageResponse() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageResponseObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageResponseObject.g.cs new file mode 100644 index 00000000..a550226a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageResponseObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageResponseObject + { + /// + /// + /// + Page, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageResponseObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageResponseObject value) + { + return value switch + { + UsageResponseObject.Page => "page", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageResponseObject? ToEnum(string value) + { + return value switch + { + "page" => UsageResponseObject.Page, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucket.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucket.Json.g.cs new file mode 100644 index 00000000..0a6217a4 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucket.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageTimeBucket + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageTimeBucket? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageTimeBucket), + jsonSerializerContext) as global::OpenAI.UsageTimeBucket; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageTimeBucket? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageTimeBucket), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageTimeBucket; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucket.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucket.g.cs new file mode 100644 index 00000000..ffb624a5 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucket.g.cs @@ -0,0 +1,72 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class UsageTimeBucket + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageTimeBucketObjectJsonConverter))] + public global::OpenAI.UsageTimeBucketObject Object { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("start_time")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int StartTime { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("end_time")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int EndTime { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("result")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Result { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageTimeBucket( + int startTime, + int endTime, + global::System.Collections.Generic.IList result, + global::OpenAI.UsageTimeBucketObject @object) + { + this.StartTime = startTime; + this.EndTime = endTime; + this.Result = result ?? throw new global::System.ArgumentNullException(nameof(result)); + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageTimeBucket() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketObject.g.cs new file mode 100644 index 00000000..79f2d72a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageTimeBucketObject + { + /// + /// + /// + Bucket, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageTimeBucketObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageTimeBucketObject value) + { + return value switch + { + UsageTimeBucketObject.Bucket => "bucket", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageTimeBucketObject? ToEnum(string value) + { + return value switch + { + "bucket" => UsageTimeBucketObject.Bucket, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminator.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminator.Json.g.cs new file mode 100644 index 00000000..f654af5e --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminator.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageTimeBucketResultItemDiscriminator + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageTimeBucketResultItemDiscriminator? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageTimeBucketResultItemDiscriminator), + jsonSerializerContext) as global::OpenAI.UsageTimeBucketResultItemDiscriminator; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageTimeBucketResultItemDiscriminator? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageTimeBucketResultItemDiscriminator), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageTimeBucketResultItemDiscriminator; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminator.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminator.g.cs new file mode 100644 index 00000000..da637937 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminator.g.cs @@ -0,0 +1,42 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public sealed partial class UsageTimeBucketResultItemDiscriminator + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageTimeBucketResultItemDiscriminatorObjectJsonConverter))] + public global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject? Object { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageTimeBucketResultItemDiscriminator( + global::OpenAI.UsageTimeBucketResultItemDiscriminatorObject? @object) + { + this.Object = @object; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageTimeBucketResultItemDiscriminator() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminatorObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminatorObject.g.cs new file mode 100644 index 00000000..4932d8cd --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageTimeBucketResultItemDiscriminatorObject.g.cs @@ -0,0 +1,93 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageTimeBucketResultItemDiscriminatorObject + { + /// + /// + /// + OrganizationUsageCompletionsResult, + /// + /// + /// + OrganizationUsageEmbeddingsResult, + /// + /// + /// + OrganizationUsageModerationsResult, + /// + /// + /// + OrganizationUsageImagesResult, + /// + /// + /// + OrganizationUsageAudioSpeechesResult, + /// + /// + /// + OrganizationUsageAudioTranscriptionsResult, + /// + /// + /// + OrganizationUsageVectorStoresResult, + /// + /// + /// + OrganizationUsageCodeInterpreterSessionsResult, + /// + /// + /// + OrganizationCostsResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageTimeBucketResultItemDiscriminatorObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageTimeBucketResultItemDiscriminatorObject value) + { + return value switch + { + UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageCompletionsResult => "organization.usage.completions.result", + UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageEmbeddingsResult => "organization.usage.embeddings.result", + UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageModerationsResult => "organization.usage.moderations.result", + UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageImagesResult => "organization.usage.images.result", + UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageAudioSpeechesResult => "organization.usage.audio_speeches.result", + UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageAudioTranscriptionsResult => "organization.usage.audio_transcriptions.result", + UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageVectorStoresResult => "organization.usage.vector_stores.result", + UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageCodeInterpreterSessionsResult => "organization.usage.code_interpreter_sessions.result", + UsageTimeBucketResultItemDiscriminatorObject.OrganizationCostsResult => "organization.costs.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageTimeBucketResultItemDiscriminatorObject? ToEnum(string value) + { + return value switch + { + "organization.usage.completions.result" => UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageCompletionsResult, + "organization.usage.embeddings.result" => UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageEmbeddingsResult, + "organization.usage.moderations.result" => UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageModerationsResult, + "organization.usage.images.result" => UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageImagesResult, + "organization.usage.audio_speeches.result" => UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageAudioSpeechesResult, + "organization.usage.audio_transcriptions.result" => UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageAudioTranscriptionsResult, + "organization.usage.vector_stores.result" => UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageVectorStoresResult, + "organization.usage.code_interpreter_sessions.result" => UsageTimeBucketResultItemDiscriminatorObject.OrganizationUsageCodeInterpreterSessionsResult, + "organization.costs.result" => UsageTimeBucketResultItemDiscriminatorObject.OrganizationCostsResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresBucketWidth.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresBucketWidth.g.cs new file mode 100644 index 00000000..616376f4 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresBucketWidth.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// Default Value: 1d + /// + public enum UsageVectorStoresBucketWidth + { + /// + /// + /// + x1m, + /// + /// + /// + x1h, + /// + /// + /// + x1d, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageVectorStoresBucketWidthExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageVectorStoresBucketWidth value) + { + return value switch + { + UsageVectorStoresBucketWidth.x1m => "1m", + UsageVectorStoresBucketWidth.x1h => "1h", + UsageVectorStoresBucketWidth.x1d => "1d", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageVectorStoresBucketWidth? ToEnum(string value) + { + return value switch + { + "1m" => UsageVectorStoresBucketWidth.x1m, + "1h" => UsageVectorStoresBucketWidth.x1h, + "1d" => UsageVectorStoresBucketWidth.x1d, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresGroupByItem.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresGroupByItem.g.cs new file mode 100644 index 00000000..f03f4921 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresGroupByItem.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageVectorStoresGroupByItem + { + /// + /// + /// + ProjectId, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageVectorStoresGroupByItemExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageVectorStoresGroupByItem value) + { + return value switch + { + UsageVectorStoresGroupByItem.ProjectId => "project_id", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageVectorStoresGroupByItem? ToEnum(string value) + { + return value switch + { + "project_id" => UsageVectorStoresGroupByItem.ProjectId, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResult.Json.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResult.Json.g.cs new file mode 100644 index 00000000..bcbd6ae3 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResult.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace OpenAI +{ + public sealed partial class UsageVectorStoresResult + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::OpenAI.UsageVectorStoresResult? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::OpenAI.UsageVectorStoresResult), + jsonSerializerContext) as global::OpenAI.UsageVectorStoresResult; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::OpenAI.UsageVectorStoresResult? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::OpenAI.UsageVectorStoresResult), + jsonSerializerContext).ConfigureAwait(false)) as global::OpenAI.UsageVectorStoresResult; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResult.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResult.g.cs new file mode 100644 index 00000000..d1ff9e3c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResult.g.cs @@ -0,0 +1,65 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// The aggregated vector stores usage details of the specific time bucket. + /// + public sealed partial class UsageVectorStoresResult + { + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("object")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::OpenAI.JsonConverters.UsageVectorStoresResultObjectJsonConverter))] + public global::OpenAI.UsageVectorStoresResultObject Object { get; set; } + + /// + /// The vector stores usage in bytes. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("usage_bytes")] + [global::System.Text.Json.Serialization.JsonRequired] + public required int UsageBytes { get; set; } + + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + public string? ProjectId { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// + /// The vector stores usage in bytes. + /// + /// + /// When `group_by=project_id`, this field provides the project ID of the grouped usage result. + /// + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] + public UsageVectorStoresResult( + int usageBytes, + global::OpenAI.UsageVectorStoresResultObject @object, + string? projectId) + { + this.UsageBytes = usageBytes; + this.Object = @object; + this.ProjectId = projectId; + } + + /// + /// Initializes a new instance of the class. + /// + public UsageVectorStoresResult() + { + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResultObject.g.cs b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResultObject.g.cs new file mode 100644 index 00000000..0f6177c2 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.Models.UsageVectorStoresResultObject.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// + /// + public enum UsageVectorStoresResultObject + { + /// + /// + /// + OrganizationUsageVectorStoresResult, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class UsageVectorStoresResultObjectExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this UsageVectorStoresResultObject value) + { + return value switch + { + UsageVectorStoresResultObject.OrganizationUsageVectorStoresResult => "organization.usage.vector_stores.result", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static UsageVectorStoresResultObject? ToEnum(string value) + { + return value switch + { + "organization.usage.vector_stores.result" => UsageVectorStoresResultObject.OrganizationUsageVectorStoresResult, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.OpenAiApi.g.cs b/src/libs/OpenAI/Generated/OpenAI.OpenAiApi.g.cs index 7d34740d..6b7084c7 100644 --- a/src/libs/OpenAI/Generated/OpenAI.OpenAiApi.g.cs +++ b/src/libs/OpenAI/Generated/OpenAI.OpenAiApi.g.cs @@ -154,6 +154,15 @@ public sealed partial class OpenAiApi : global::OpenAI.IOpenAiApi, global::Syste JsonSerializerContext = JsonSerializerContext, }; + /// + /// + /// + public UsageClient Usage => new UsageClient(HttpClient, authorizations: Authorizations) + { + ReadResponseAsString = ReadResponseAsString, + JsonSerializerContext = JsonSerializerContext, + }; + /// /// /// diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageAudioSpeeches.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageAudioSpeeches.g.cs new file mode 100644 index 00000000..ef7b26ed --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageAudioSpeeches.g.cs @@ -0,0 +1,219 @@ + +#nullable enable + +namespace OpenAI +{ + public partial class UsageClient + { + partial void PrepareUsageAudioSpeechesArguments( + global::System.Net.Http.HttpClient httpClient, + ref int startTime, + ref int? endTime, + ref global::OpenAI.UsageAudioSpeechesBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + ref int? limit, + ref string? page); + partial void PrepareUsageAudioSpeechesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int startTime, + int? endTime, + global::OpenAI.UsageAudioSpeechesBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + int? limit, + string? page); + partial void ProcessUsageAudioSpeechesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUsageAudioSpeechesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get audio speeches usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsageAudioSpeechesAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageAudioSpeechesBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUsageAudioSpeechesArguments( + httpClient: HttpClient, + startTime: ref startTime, + endTime: ref endTime, + bucketWidth: ref bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: ref limit, + page: ref page); + + var __pathBuilder = new PathBuilder( + path: "/organization/usage/audio_speeches", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page", page) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUsageAudioSpeechesRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + startTime: startTime, + endTime: endTime, + bucketWidth: bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: limit, + page: page); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUsageAudioSpeechesResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageAudioSpeechesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::OpenAI.UsageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + return + await global::OpenAI.UsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageAudioTranscriptions.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageAudioTranscriptions.g.cs new file mode 100644 index 00000000..a464039a --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageAudioTranscriptions.g.cs @@ -0,0 +1,219 @@ + +#nullable enable + +namespace OpenAI +{ + public partial class UsageClient + { + partial void PrepareUsageAudioTranscriptionsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int startTime, + ref int? endTime, + ref global::OpenAI.UsageAudioTranscriptionsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + ref int? limit, + ref string? page); + partial void PrepareUsageAudioTranscriptionsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int startTime, + int? endTime, + global::OpenAI.UsageAudioTranscriptionsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + int? limit, + string? page); + partial void ProcessUsageAudioTranscriptionsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUsageAudioTranscriptionsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get audio transcriptions usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsageAudioTranscriptionsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageAudioTranscriptionsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUsageAudioTranscriptionsArguments( + httpClient: HttpClient, + startTime: ref startTime, + endTime: ref endTime, + bucketWidth: ref bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: ref limit, + page: ref page); + + var __pathBuilder = new PathBuilder( + path: "/organization/usage/audio_transcriptions", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page", page) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUsageAudioTranscriptionsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + startTime: startTime, + endTime: endTime, + bucketWidth: bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: limit, + page: page); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUsageAudioTranscriptionsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageAudioTranscriptionsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::OpenAI.UsageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + return + await global::OpenAI.UsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCodeInterpreterSessions.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCodeInterpreterSessions.g.cs new file mode 100644 index 00000000..f660d992 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCodeInterpreterSessions.g.cs @@ -0,0 +1,198 @@ + +#nullable enable + +namespace OpenAI +{ + public partial class UsageClient + { + partial void PrepareUsageCodeInterpreterSessionsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int startTime, + ref int? endTime, + ref global::OpenAI.UsageCodeInterpreterSessionsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? groupBy, + ref int? limit, + ref string? page); + partial void PrepareUsageCodeInterpreterSessionsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int startTime, + int? endTime, + global::OpenAI.UsageCodeInterpreterSessionsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? groupBy, + int? limit, + string? page); + partial void ProcessUsageCodeInterpreterSessionsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUsageCodeInterpreterSessionsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get code interpreter sessions usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsageCodeInterpreterSessionsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageCodeInterpreterSessionsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUsageCodeInterpreterSessionsArguments( + httpClient: HttpClient, + startTime: ref startTime, + endTime: ref endTime, + bucketWidth: ref bucketWidth, + projectIds: projectIds, + groupBy: groupBy, + limit: ref limit, + page: ref page); + + var __pathBuilder = new PathBuilder( + path: "/organization/usage/code_interpreter_sessions", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page", page) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUsageCodeInterpreterSessionsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + startTime: startTime, + endTime: endTime, + bucketWidth: bucketWidth, + projectIds: projectIds, + groupBy: groupBy, + limit: limit, + page: page); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUsageCodeInterpreterSessionsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageCodeInterpreterSessionsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::OpenAI.UsageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + return + await global::OpenAI.UsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCompletions.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCompletions.g.cs new file mode 100644 index 00000000..630f9dcf --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCompletions.g.cs @@ -0,0 +1,226 @@ + +#nullable enable + +namespace OpenAI +{ + public partial class UsageClient + { + partial void PrepareUsageCompletionsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int startTime, + ref int? endTime, + ref global::OpenAI.UsageCompletionsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + ref bool? batch, + global::System.Collections.Generic.IList? groupBy, + ref int? limit, + ref string? page); + partial void PrepareUsageCompletionsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int startTime, + int? endTime, + global::OpenAI.UsageCompletionsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + bool? batch, + global::System.Collections.Generic.IList? groupBy, + int? limit, + string? page); + partial void ProcessUsageCompletionsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUsageCompletionsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get completions usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsageCompletionsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageCompletionsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + bool? batch = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUsageCompletionsArguments( + httpClient: HttpClient, + startTime: ref startTime, + endTime: ref endTime, + bucketWidth: ref bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + batch: ref batch, + groupBy: groupBy, + limit: ref limit, + page: ref page); + + var __pathBuilder = new PathBuilder( + path: "/organization/usage/completions", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("batch", batch?.ToString()) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page", page) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUsageCompletionsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + startTime: startTime, + endTime: endTime, + bucketWidth: bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + batch: batch, + groupBy: groupBy, + limit: limit, + page: page); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUsageCompletionsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageCompletionsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::OpenAI.UsageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + return + await global::OpenAI.UsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCosts.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCosts.g.cs new file mode 100644 index 00000000..724e0931 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageCosts.g.cs @@ -0,0 +1,200 @@ + +#nullable enable + +namespace OpenAI +{ + public partial class UsageClient + { + partial void PrepareUsageCostsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int startTime, + ref int? endTime, + ref global::OpenAI.UsageCostsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? groupBy, + ref int? limit, + ref string? page); + partial void PrepareUsageCostsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int startTime, + int? endTime, + global::OpenAI.UsageCostsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? groupBy, + int? limit, + string? page); + partial void ProcessUsageCostsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUsageCostsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get costs details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// Default Value: 7 + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsageCostsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageCostsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUsageCostsArguments( + httpClient: HttpClient, + startTime: ref startTime, + endTime: ref endTime, + bucketWidth: ref bucketWidth, + projectIds: projectIds, + groupBy: groupBy, + limit: ref limit, + page: ref page); + + var __pathBuilder = new PathBuilder( + path: "/organization/costs", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page", page) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUsageCostsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + startTime: startTime, + endTime: endTime, + bucketWidth: bucketWidth, + projectIds: projectIds, + groupBy: groupBy, + limit: limit, + page: page); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUsageCostsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageCostsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::OpenAI.UsageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + return + await global::OpenAI.UsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageEmbeddings.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageEmbeddings.g.cs new file mode 100644 index 00000000..8c2c1a91 --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageEmbeddings.g.cs @@ -0,0 +1,219 @@ + +#nullable enable + +namespace OpenAI +{ + public partial class UsageClient + { + partial void PrepareUsageEmbeddingsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int startTime, + ref int? endTime, + ref global::OpenAI.UsageEmbeddingsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + ref int? limit, + ref string? page); + partial void PrepareUsageEmbeddingsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int startTime, + int? endTime, + global::OpenAI.UsageEmbeddingsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + int? limit, + string? page); + partial void ProcessUsageEmbeddingsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUsageEmbeddingsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get embeddings usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsageEmbeddingsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageEmbeddingsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUsageEmbeddingsArguments( + httpClient: HttpClient, + startTime: ref startTime, + endTime: ref endTime, + bucketWidth: ref bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: ref limit, + page: ref page); + + var __pathBuilder = new PathBuilder( + path: "/organization/usage/embeddings", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page", page) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUsageEmbeddingsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + startTime: startTime, + endTime: endTime, + bucketWidth: bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: limit, + page: page); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUsageEmbeddingsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageEmbeddingsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::OpenAI.UsageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + return + await global::OpenAI.UsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageImages.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageImages.g.cs new file mode 100644 index 00000000..32da15cd --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageImages.g.cs @@ -0,0 +1,231 @@ + +#nullable enable + +namespace OpenAI +{ + public partial class UsageClient + { + partial void PrepareUsageImagesArguments( + global::System.Net.Http.HttpClient httpClient, + ref int startTime, + ref int? endTime, + ref global::OpenAI.UsageImagesBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? sources, + global::System.Collections.Generic.IList? sizes, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + ref int? limit, + ref string? page); + partial void PrepareUsageImagesRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int startTime, + int? endTime, + global::OpenAI.UsageImagesBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? sources, + global::System.Collections.Generic.IList? sizes, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + int? limit, + string? page); + partial void ProcessUsageImagesResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUsageImagesResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get images usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsageImagesAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageImagesBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? sources = default, + global::System.Collections.Generic.IList? sizes = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUsageImagesArguments( + httpClient: HttpClient, + startTime: ref startTime, + endTime: ref endTime, + bucketWidth: ref bucketWidth, + sources: sources, + sizes: sizes, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: ref limit, + page: ref page); + + var __pathBuilder = new PathBuilder( + path: "/organization/usage/images", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page", page) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUsageImagesRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + startTime: startTime, + endTime: endTime, + bucketWidth: bucketWidth, + sources: sources, + sizes: sizes, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: limit, + page: page); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUsageImagesResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageImagesResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::OpenAI.UsageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + return + await global::OpenAI.UsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageModerations.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageModerations.g.cs new file mode 100644 index 00000000..b4ed4a1b --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageModerations.g.cs @@ -0,0 +1,219 @@ + +#nullable enable + +namespace OpenAI +{ + public partial class UsageClient + { + partial void PrepareUsageModerationsArguments( + global::System.Net.Http.HttpClient httpClient, + ref int startTime, + ref int? endTime, + ref global::OpenAI.UsageModerationsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + ref int? limit, + ref string? page); + partial void PrepareUsageModerationsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int startTime, + int? endTime, + global::OpenAI.UsageModerationsBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? userIds, + global::System.Collections.Generic.IList? apiKeyIds, + global::System.Collections.Generic.IList? models, + global::System.Collections.Generic.IList? groupBy, + int? limit, + string? page); + partial void ProcessUsageModerationsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUsageModerationsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get moderations usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsageModerationsAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageModerationsBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? userIds = default, + global::System.Collections.Generic.IList? apiKeyIds = default, + global::System.Collections.Generic.IList? models = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUsageModerationsArguments( + httpClient: HttpClient, + startTime: ref startTime, + endTime: ref endTime, + bucketWidth: ref bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: ref limit, + page: ref page); + + var __pathBuilder = new PathBuilder( + path: "/organization/usage/moderations", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("user_ids", userIds, delimiter: ",", explode: true) + .AddOptionalParameter("api_key_ids", apiKeyIds, delimiter: ",", explode: true) + .AddOptionalParameter("models", models, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page", page) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUsageModerationsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + startTime: startTime, + endTime: endTime, + bucketWidth: bucketWidth, + projectIds: projectIds, + userIds: userIds, + apiKeyIds: apiKeyIds, + models: models, + groupBy: groupBy, + limit: limit, + page: page); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUsageModerationsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageModerationsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::OpenAI.UsageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + return + await global::OpenAI.UsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageVectorStores.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageVectorStores.g.cs new file mode 100644 index 00000000..406d3e2c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.UsageVectorStores.g.cs @@ -0,0 +1,198 @@ + +#nullable enable + +namespace OpenAI +{ + public partial class UsageClient + { + partial void PrepareUsageVectorStoresArguments( + global::System.Net.Http.HttpClient httpClient, + ref int startTime, + ref int? endTime, + ref global::OpenAI.UsageVectorStoresBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? groupBy, + ref int? limit, + ref string? page); + partial void PrepareUsageVectorStoresRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + int startTime, + int? endTime, + global::OpenAI.UsageVectorStoresBucketWidth? bucketWidth, + global::System.Collections.Generic.IList? projectIds, + global::System.Collections.Generic.IList? groupBy, + int? limit, + string? page); + partial void ProcessUsageVectorStoresResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessUsageVectorStoresResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Get vector stores usage details for the organization. + /// + /// + /// + /// + /// Default Value: 1d + /// + /// + /// + /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task UsageVectorStoresAsync( + int startTime, + int? endTime = default, + global::OpenAI.UsageVectorStoresBucketWidth? bucketWidth = default, + global::System.Collections.Generic.IList? projectIds = default, + global::System.Collections.Generic.IList? groupBy = default, + int? limit = default, + string? page = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareUsageVectorStoresArguments( + httpClient: HttpClient, + startTime: ref startTime, + endTime: ref endTime, + bucketWidth: ref bucketWidth, + projectIds: projectIds, + groupBy: groupBy, + limit: ref limit, + page: ref page); + + var __pathBuilder = new PathBuilder( + path: "/organization/usage/vector_stores", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("start_time", startTime.ToString()) + .AddOptionalParameter("end_time", endTime?.ToString()) + .AddOptionalParameter("bucket_width", bucketWidth?.ToValueString()) + .AddOptionalParameter("project_ids", projectIds, delimiter: ",", explode: true) + .AddOptionalParameter("limit", limit?.ToString()) + .AddOptionalParameter("page", page) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Get, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareUsageVectorStoresRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + startTime: startTime, + endTime: endTime, + bucketWidth: bucketWidth, + projectIds: projectIds, + groupBy: groupBy, + limit: limit, + page: page); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessUsageVectorStoresResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessUsageVectorStoresResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + return + global::OpenAI.UsageResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + } + catch (global::System.Net.Http.HttpRequestException __ex) + { + throw new global::OpenAI.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + + return + await global::OpenAI.UsageResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + } + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/Generated/OpenAI.UsageClient.g.cs b/src/libs/OpenAI/Generated/OpenAI.UsageClient.g.cs new file mode 100644 index 00000000..cb52c16c --- /dev/null +++ b/src/libs/OpenAI/Generated/OpenAI.UsageClient.g.cs @@ -0,0 +1,86 @@ + +#nullable enable + +namespace OpenAI +{ + /// + /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + ///
+ public sealed partial class UsageClient : global::OpenAI.IUsageClient, global::System.IDisposable + { + /// + /// + /// + public const string DefaultBaseUrl = "https://api.openai.com/v1"; + + private bool _disposeHttpClient = true; + + /// + public global::System.Net.Http.HttpClient HttpClient { get; } + + /// + public System.Uri? BaseUri => HttpClient.BaseAddress; + + /// + public global::System.Collections.Generic.List Authorizations { get; } + + /// + public bool ReadResponseAsString { get; set; } +#if DEBUG + = true; +#endif + /// + /// + /// + public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::OpenAI.SourceGenerationContext.Default; + + + /// + /// Creates a new instance of the UsageClient. + /// If no httpClient is provided, a new one will be created. + /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used. + /// + /// The HttpClient instance. If not provided, a new one will be created. + /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used. + /// The authorizations to use for the requests. + /// Dispose the HttpClient when the instance is disposed. True by default. + public UsageClient( + global::System.Net.Http.HttpClient? httpClient = null, + global::System.Uri? baseUri = null, + global::System.Collections.Generic.List? authorizations = null, + bool disposeHttpClient = true) + { + HttpClient = httpClient ?? new global::System.Net.Http.HttpClient(); + HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl); + Authorizations = authorizations ?? new global::System.Collections.Generic.List(); + _disposeHttpClient = disposeHttpClient; + + Initialized(HttpClient); + } + + /// + public void Dispose() + { + if (_disposeHttpClient) + { + HttpClient.Dispose(); + } + } + + partial void Initialized( + global::System.Net.Http.HttpClient client); + partial void PrepareArguments( + global::System.Net.Http.HttpClient client); + partial void PrepareRequest( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpRequestMessage request); + partial void ProcessResponse( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response); + partial void ProcessResponseContent( + global::System.Net.Http.HttpClient client, + global::System.Net.Http.HttpResponseMessage response, + ref string content); + } +} \ No newline at end of file diff --git a/src/libs/OpenAI/openapi.yaml b/src/libs/OpenAI/openapi.yaml index 80f078b5..d1e8f352 100644 --- a/src/libs/OpenAI/openapi.yaml +++ b/src/libs/OpenAI/openapi.yaml @@ -481,9 +481,9 @@ paths: examples: - title: Default request: - curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n" - python: "from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model=\"VAR_model_id\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n)\n\nprint(completion.choices[0].message)\n" - node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"system\", content: \"You are a helpful assistant.\" }],\n model: \"VAR_model_id\",\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();" + curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ]\n }'\n" + python: "from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model=\"VAR_chat_model_id\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ]\n)\n\nprint(completion.choices[0].message)\n" + node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"system\", content: \"You are a helpful assistant.\" }],\n model: \"VAR_chat_model_id\",\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();" response: "{\n \"id\": \"chatcmpl-123\",\n \"object\": \"chat.completion\",\n \"created\": 1677652288,\n \"model\": \"gpt-4o-mini\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [{\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"\\n\\nHello there, how may I assist you today?\",\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }],\n \"usage\": {\n \"prompt_tokens\": 9,\n \"completion_tokens\": 12,\n \"total_tokens\": 21,\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n }\n}\n" - title: Image input request: @@ -493,21 +493,21 @@ paths: response: "{\n \"id\": \"chatcmpl-123\",\n \"object\": \"chat.completion\",\n \"created\": 1677652288,\n \"model\": \"gpt-4o-mini\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [{\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"\\n\\nThis image shows a wooden boardwalk extending through a lush green marshland.\",\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n }],\n \"usage\": {\n \"prompt_tokens\": 9,\n \"completion_tokens\": 12,\n \"total_tokens\": 21,\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n }\n}\n" - title: Streaming request: - curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"stream\": true\n }'\n" - python: "from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model=\"VAR_model_id\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n stream=True\n)\n\nfor chunk in completion:\n print(chunk.choices[0].delta)\n" - node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n model: \"VAR_model_id\",\n messages: [\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n stream: true,\n });\n\n for await (const chunk of completion) {\n console.log(chunk.choices[0].delta.content);\n }\n}\n\nmain();" + curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a helpful assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"stream\": true\n }'\n" + python: "from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model=\"VAR_chat_model_id\",\n messages=[\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n stream=True\n)\n\nfor chunk in completion:\n print(chunk.choices[0].delta)\n" + node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n model: \"VAR_chat_model_id\",\n messages: [\n {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n stream: true,\n });\n\n for await (const chunk of completion) {\n console.log(chunk.choices[0].delta.content);\n }\n}\n\nmain();" response: "{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{\"content\":\"Hello\"},\"logprobs\":null,\"finish_reason\":null}]}\n\n....\n\n{\"id\":\"chatcmpl-123\",\"object\":\"chat.completion.chunk\",\"created\":1694268190,\"model\":\"gpt-4o-mini\", \"system_fingerprint\": \"fp_44709d6fcb\", \"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}]}\n" - title: Functions request: curl: "curl https://api.openai.com/v1/chat/completions \\\n-H \"Content-Type: application/json\" \\\n-H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n-d '{\n \"model\": \"gpt-4o\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"What'\\''s the weather like in Boston today?\"\n }\n ],\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\"\n },\n \"unit\": {\n \"type\": \"string\",\n \"enum\": [\"celsius\", \"fahrenheit\"]\n }\n },\n \"required\": [\"location\"]\n }\n }\n }\n ],\n \"tool_choice\": \"auto\"\n}'\n" - python: "from openai import OpenAI\nclient = OpenAI()\n\ntools = [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\",\n },\n \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]},\n },\n \"required\": [\"location\"],\n },\n }\n }\n]\nmessages = [{\"role\": \"user\", \"content\": \"What's the weather like in Boston today?\"}]\ncompletion = client.chat.completions.create(\n model=\"VAR_model_id\",\n messages=messages,\n tools=tools,\n tool_choice=\"auto\"\n)\n\nprint(completion)\n" + python: "from openai import OpenAI\nclient = OpenAI()\n\ntools = [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\",\n },\n \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]},\n },\n \"required\": [\"location\"],\n },\n }\n }\n]\nmessages = [{\"role\": \"user\", \"content\": \"What's the weather like in Boston today?\"}]\ncompletion = client.chat.completions.create(\n model=\"VAR_chat_model_id\",\n messages=messages,\n tools=tools,\n tool_choice=\"auto\"\n)\n\nprint(completion)\n" node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const messages = [{\"role\": \"user\", \"content\": \"What's the weather like in Boston today?\"}];\n const tools = [\n {\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"description\": \"Get the current weather in a given location\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": {\n \"type\": \"string\",\n \"description\": \"The city and state, e.g. San Francisco, CA\",\n },\n \"unit\": {\"type\": \"string\", \"enum\": [\"celsius\", \"fahrenheit\"]},\n },\n \"required\": [\"location\"],\n },\n }\n }\n ];\n\n const response = await openai.chat.completions.create({\n model: \"gpt-4o\",\n messages: messages,\n tools: tools,\n tool_choice: \"auto\",\n });\n\n console.log(response);\n}\n\nmain();" response: "{\n \"id\": \"chatcmpl-abc123\",\n \"object\": \"chat.completion\",\n \"created\": 1699896916,\n \"model\": \"gpt-4o-mini\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n \"id\": \"call_abc123\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_current_weather\",\n \"arguments\": \"{\\n\\\"location\\\": \\\"Boston, MA\\\"\\n}\"\n }\n }\n ]\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 82,\n \"completion_tokens\": 17,\n \"total_tokens\": 99,\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n }\n}\n" - title: Logprobs request: - curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"logprobs\": true,\n \"top_logprobs\": 2\n }'\n" - python: "from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model=\"VAR_model_id\",\n messages=[\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n logprobs=True,\n top_logprobs=2\n)\n\nprint(completion.choices[0].message)\nprint(completion.choices[0].logprobs)\n" - node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"user\", content: \"Hello!\" }],\n model: \"VAR_model_id\",\n logprobs: true,\n top_logprobs: 2,\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();" + curl: "curl https://api.openai.com/v1/chat/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_chat_model_id\",\n \"messages\": [\n {\n \"role\": \"user\",\n \"content\": \"Hello!\"\n }\n ],\n \"logprobs\": true,\n \"top_logprobs\": 2\n }'\n" + python: "from openai import OpenAI\nclient = OpenAI()\n\ncompletion = client.chat.completions.create(\n model=\"VAR_chat_model_id\",\n messages=[\n {\"role\": \"user\", \"content\": \"Hello!\"}\n ],\n logprobs=True,\n top_logprobs=2\n)\n\nprint(completion.choices[0].message)\nprint(completion.choices[0].logprobs)\n" + node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.chat.completions.create({\n messages: [{ role: \"user\", content: \"Hello!\" }],\n model: \"VAR_chat_model_id\",\n logprobs: true,\n top_logprobs: 2,\n });\n\n console.log(completion.choices[0]);\n}\n\nmain();" response: "{\n \"id\": \"chatcmpl-123\",\n \"object\": \"chat.completion\",\n \"created\": 1702685778,\n \"model\": \"gpt-4o-mini\",\n \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": \"Hello! How can I assist you today?\"\n },\n \"logprobs\": {\n \"content\": [\n {\n \"token\": \"Hello\",\n \"logprob\": -0.31725305,\n \"bytes\": [72, 101, 108, 108, 111],\n \"top_logprobs\": [\n {\n \"token\": \"Hello\",\n \"logprob\": -0.31725305,\n \"bytes\": [72, 101, 108, 108, 111]\n },\n {\n \"token\": \"Hi\",\n \"logprob\": -1.3190403,\n \"bytes\": [72, 105]\n }\n ]\n },\n {\n \"token\": \"!\",\n \"logprob\": -0.02380986,\n \"bytes\": [\n 33\n ],\n \"top_logprobs\": [\n {\n \"token\": \"!\",\n \"logprob\": -0.02380986,\n \"bytes\": [33]\n },\n {\n \"token\": \" there\",\n \"logprob\": -3.787621,\n \"bytes\": [32, 116, 104, 101, 114, 101]\n }\n ]\n },\n {\n \"token\": \" How\",\n \"logprob\": -0.000054669687,\n \"bytes\": [32, 72, 111, 119],\n \"top_logprobs\": [\n {\n \"token\": \" How\",\n \"logprob\": -0.000054669687,\n \"bytes\": [32, 72, 111, 119]\n },\n {\n \"token\": \"<|end|>\",\n \"logprob\": -10.953937,\n \"bytes\": null\n }\n ]\n },\n {\n \"token\": \" can\",\n \"logprob\": -0.015801601,\n \"bytes\": [32, 99, 97, 110],\n \"top_logprobs\": [\n {\n \"token\": \" can\",\n \"logprob\": -0.015801601,\n \"bytes\": [32, 99, 97, 110]\n },\n {\n \"token\": \" may\",\n \"logprob\": -4.161023,\n \"bytes\": [32, 109, 97, 121]\n }\n ]\n },\n {\n \"token\": \" I\",\n \"logprob\": -3.7697225e-6,\n \"bytes\": [\n 32,\n 73\n ],\n \"top_logprobs\": [\n {\n \"token\": \" I\",\n \"logprob\": -3.7697225e-6,\n \"bytes\": [32, 73]\n },\n {\n \"token\": \" assist\",\n \"logprob\": -13.596657,\n \"bytes\": [32, 97, 115, 115, 105, 115, 116]\n }\n ]\n },\n {\n \"token\": \" assist\",\n \"logprob\": -0.04571125,\n \"bytes\": [32, 97, 115, 115, 105, 115, 116],\n \"top_logprobs\": [\n {\n \"token\": \" assist\",\n \"logprob\": -0.04571125,\n \"bytes\": [32, 97, 115, 115, 105, 115, 116]\n },\n {\n \"token\": \" help\",\n \"logprob\": -3.1089056,\n \"bytes\": [32, 104, 101, 108, 112]\n }\n ]\n },\n {\n \"token\": \" you\",\n \"logprob\": -5.4385737e-6,\n \"bytes\": [32, 121, 111, 117],\n \"top_logprobs\": [\n {\n \"token\": \" you\",\n \"logprob\": -5.4385737e-6,\n \"bytes\": [32, 121, 111, 117]\n },\n {\n \"token\": \" today\",\n \"logprob\": -12.807695,\n \"bytes\": [32, 116, 111, 100, 97, 121]\n }\n ]\n },\n {\n \"token\": \" today\",\n \"logprob\": -0.0040071653,\n \"bytes\": [32, 116, 111, 100, 97, 121],\n \"top_logprobs\": [\n {\n \"token\": \" today\",\n \"logprob\": -0.0040071653,\n \"bytes\": [32, 116, 111, 100, 97, 121]\n },\n {\n \"token\": \"?\",\n \"logprob\": -5.5247097,\n \"bytes\": [63]\n }\n ]\n },\n {\n \"token\": \"?\",\n \"logprob\": -0.0008108172,\n \"bytes\": [63],\n \"top_logprobs\": [\n {\n \"token\": \"?\",\n \"logprob\": -0.0008108172,\n \"bytes\": [63]\n },\n {\n \"token\": \"?\\n\",\n \"logprob\": -7.184561,\n \"bytes\": [63, 10]\n }\n ]\n }\n ]\n },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 9,\n \"completion_tokens\": 9,\n \"total_tokens\": 18,\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"system_fingerprint\": null\n}\n" /completions: post: @@ -536,15 +536,15 @@ paths: examples: - title: No streaming request: - curl: "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0\n }'\n" - python: "from openai import OpenAI\nclient = OpenAI()\n\nclient.completions.create(\n model=\"VAR_model_id\",\n prompt=\"Say this is a test\",\n max_tokens=7,\n temperature=0\n)\n" - node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.completions.create({\n model: \"VAR_model_id\",\n prompt: \"Say this is a test.\",\n max_tokens: 7,\n temperature: 0,\n });\n\n console.log(completion);\n}\nmain();" - response: "{\n \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n \"object\": \"text_completion\",\n \"created\": 1589478378,\n \"model\": \"VAR_model_id\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [\n {\n \"text\": \"\\n\\nThis is indeed a test\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": \"length\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 5,\n \"completion_tokens\": 7,\n \"total_tokens\": 12\n }\n}\n" + curl: "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_completion_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0\n }'\n" + python: "from openai import OpenAI\nclient = OpenAI()\n\nclient.completions.create(\n model=\"VAR_completion_model_id\",\n prompt=\"Say this is a test\",\n max_tokens=7,\n temperature=0\n)\n" + node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const completion = await openai.completions.create({\n model: \"VAR_completion_model_id\",\n prompt: \"Say this is a test.\",\n max_tokens: 7,\n temperature: 0,\n });\n\n console.log(completion);\n}\nmain();" + response: "{\n \"id\": \"cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7\",\n \"object\": \"text_completion\",\n \"created\": 1589478378,\n \"model\": \"VAR_completion_model_id\",\n \"system_fingerprint\": \"fp_44709d6fcb\",\n \"choices\": [\n {\n \"text\": \"\\n\\nThis is indeed a test\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": \"length\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 5,\n \"completion_tokens\": 7,\n \"total_tokens\": 12\n }\n}\n" - title: Streaming request: - curl: "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0,\n \"stream\": true\n }'\n" - python: "from openai import OpenAI\nclient = OpenAI()\n\nfor chunk in client.completions.create(\n model=\"VAR_model_id\",\n prompt=\"Say this is a test\",\n max_tokens=7,\n temperature=0,\n stream=True\n):\n print(chunk.choices[0].text)\n" - node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const stream = await openai.completions.create({\n model: \"VAR_model_id\",\n prompt: \"Say this is a test.\",\n stream: true,\n });\n\n for await (const chunk of stream) {\n console.log(chunk.choices[0].text)\n }\n}\nmain();" + curl: "curl https://api.openai.com/v1/completions \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n -d '{\n \"model\": \"VAR_completion_model_id\",\n \"prompt\": \"Say this is a test\",\n \"max_tokens\": 7,\n \"temperature\": 0,\n \"stream\": true\n }'\n" + python: "from openai import OpenAI\nclient = OpenAI()\n\nfor chunk in client.completions.create(\n model=\"VAR_completion_model_id\",\n prompt=\"Say this is a test\",\n max_tokens=7,\n temperature=0,\n stream=True\n):\n print(chunk.choices[0].text)\n" + node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const stream = await openai.completions.create({\n model: \"VAR_completion_model_id\",\n prompt: \"Say this is a test.\",\n stream: true,\n });\n\n for await (const chunk of stream) {\n console.log(chunk.choices[0].text)\n }\n}\nmain();" response: "{\n \"id\": \"cmpl-7iA7iJjj8V2zOkCGvWF2hAkDWBQZe\",\n \"object\": \"text_completion\",\n \"created\": 1690759702,\n \"choices\": [\n {\n \"text\": \"This\",\n \"index\": 0,\n \"logprobs\": null,\n \"finish_reason\": null\n }\n ],\n \"model\": \"gpt-3.5-turbo-instruct\"\n \"system_fingerprint\": \"fp_44709d6fcb\",\n}\n" /embeddings: post: @@ -1102,10 +1102,10 @@ paths: returns: 'The [model](/docs/api-reference/models/object) object matching the specified ID.' examples: request: - curl: "curl https://api.openai.com/v1/models/VAR_model_id \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" - python: "from openai import OpenAI\nclient = OpenAI()\n\nclient.models.retrieve(\"VAR_model_id\")\n" - node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.retrieve(\"VAR_model_id\");\n\n console.log(model);\n}\n\nmain();" - response: "{\n \"id\": \"VAR_model_id\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n}\n" + curl: "curl https://api.openai.com/v1/models/VAR_chat_model_id \\\n -H \"Authorization: Bearer $OPENAI_API_KEY\"\n" + python: "from openai import OpenAI\nclient = OpenAI()\n\nclient.models.retrieve(\"VAR_chat_model_id\")\n" + node.js: "import OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n\nasync function main() {\n const model = await openai.models.retrieve(\"VAR_chat_model_id\");\n\n console.log(model);\n}\n\nmain();" + response: "{\n \"id\": \"VAR_chat_model_id\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n}\n" delete: tags: - Models @@ -1261,8 +1261,77 @@ paths: returns: 'A list of paginated [Audit Log](/docs/api-reference/audit-logs/object) objects.' examples: request: - curl: "curl https://api.openai.com/v1/organization/audit_logs \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\" \\\n" + curl: "curl https://api.openai.com/v1/organization/audit_logs \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" response: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"audit_log-xxx_yyyymmdd\",\n \"type\": \"project.archived\",\n \"effective_at\": 1722461446,\n \"actor\": {\n \"type\": \"api_key\",\n \"api_key\": {\n \"type\": \"user\",\n \"user\": {\n \"id\": \"user-xxx\",\n \"email\": \"user@example.com\"\n }\n }\n },\n \"project.archived\": {\n \"id\": \"proj_abc\"\n },\n },\n {\n \"id\": \"audit_log-yyy__20240101\",\n \"type\": \"api_key.updated\",\n \"effective_at\": 1720804190,\n \"actor\": {\n \"type\": \"session\",\n \"session\": {\n \"user\": {\n \"id\": \"user-xxx\",\n \"email\": \"user@example.com\"\n },\n \"ip_address\": \"127.0.0.1\",\n \"user_agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36\"\n }\n },\n \"api_key.updated\": {\n \"id\": \"key_xxxx\",\n \"data\": {\n \"scopes\": [\"resource_2.operation_2\"]\n }\n },\n }\n ],\n \"first_id\": \"audit_log-xxx__20240101\",\n \"last_id\": \"audit_log_yyy__20240101\",\n \"has_more\": true\n}\n" + /organization/costs: + get: + tags: + - Usage + summary: Get costs details for the organization. + operationId: usage-costs + parameters: + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' + required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently only `1d` is supported, default to `1d`.' + schema: + enum: + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only costs for these projects. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the costs by the specified fields. Support fields include `project_id`, `line_item` and any combination of them.' + schema: + type: array + items: + enum: + - project_id + - line_item + type: string + - name: limit + in: query + description: "A limit on the number of buckets to be returned. Limit can range between 1 and 180, and the default is 7.\n" + schema: + type: integer + default: 7 + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string + responses: + '200': + description: Costs data retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UsageResponse' + x-oaiMeta: + name: Costs + group: usage-costs + returns: 'A list of paginated, time bucketed [Costs](/docs/api-reference/usage/costs_object) objects.' + examples: + request: + curl: "curl \"https://api.openai.com/v1/organization/costs?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.costs.result\",\n \"amount\": {\n \"value\": 0.06,\n \"currency\": \"usd\"\n },\n \"line_item\": null,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" /organization/invites: get: tags: @@ -2129,6 +2198,734 @@ paths: curl: "curl -X DELETE https://api.openai.com/v1/organization/projects/proj_abc/users/user_abc \\\n -H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n -H \"Content-Type: application/json\"\n" response: content: "{\n \"object\": \"organization.project.user.deleted\",\n \"id\": \"user_abc\",\n \"deleted\": true\n}\n" + /organization/usage/audio_speeches: + get: + tags: + - Usage + summary: Get audio speeches usage details for the organization. + operationId: usage-audio-speeches + parameters: + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' + required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string + responses: + '200': + description: Usage data retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UsageResponse' + x-oaiMeta: + name: Audio speeches + group: usage-audio-speeches + returns: 'A list of paginated, time bucketed [Audio speeches usage](/docs/api-reference/usage/audio_speeches_object) objects.' + examples: + request: + curl: "curl \"https://api.openai.com/v1/organization/usage/audio_speeches?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.audio_speeches.result\",\n \"characters\": 45,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/audio_transcriptions: + get: + tags: + - Usage + summary: Get audio transcriptions usage details for the organization. + operationId: usage-audio-transcriptions + parameters: + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' + required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string + responses: + '200': + description: Usage data retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UsageResponse' + x-oaiMeta: + name: Audio transcriptions + group: usage-audio-transcriptions + returns: 'A list of paginated, time bucketed [Audio transcriptions usage](/docs/api-reference/usage/audio_transcriptions_object) objects.' + examples: + request: + curl: "curl \"https://api.openai.com/v1/organization/usage/audio_transcriptions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.audio_transcriptions.result\",\n \"seconds\": 20,\n \"num_model_requests\": 1,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/code_interpreter_sessions: + get: + tags: + - Usage + summary: Get code interpreter sessions usage details for the organization. + operationId: usage-code-interpreter-sessions + parameters: + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' + required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: Group the usage data by the specified fields. Support fields include `project_id`. + schema: + type: array + items: + enum: + - project_id + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string + responses: + '200': + description: Usage data retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UsageResponse' + x-oaiMeta: + name: Code interpreter sessions + group: usage-code-interpreter-sessions + returns: 'A list of paginated, time bucketed [Code interpreter sessions usage](/docs/api-reference/usage/code_interpreter_sessions_object) objects.' + examples: + request: + curl: "curl \"https://api.openai.com/v1/organization/usage/code_interpreter_sessions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.code_interpreter_sessions.result\",\n \"sessions\": 1,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/completions: + get: + tags: + - Usage + summary: Get completions usage details for the organization. + operationId: usage-completions + parameters: + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' + required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: batch + in: query + description: "If `true`, return batch jobs only. If `false`, return non-batch jobs only. By default, return both.\n" + schema: + type: boolean + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `batch` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + - batch + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string + responses: + '200': + description: Usage data retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UsageResponse' + x-oaiMeta: + name: Completions + group: usage-completions + returns: 'A list of paginated, time bucketed [Completions usage](/docs/api-reference/usage/completions_object) objects.' + examples: + request: + curl: "curl \"https://api.openai.com/v1/organization/usage/completions?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.completions.result\",\n \"input_tokens\": 1000,\n \"output_tokens\": 500,\n \"input_cached_tokens\": 800,\n \"num_model_requests\": 5,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null,\n \"batch\": null\n }\n ]\n }\n ],\n \"has_more\": true,\n \"next_page\": \"AAAAAGdGxdEiJdKOAAAAAGcqsYA=\"\n}\n" + /organization/usage/embeddings: + get: + tags: + - Usage + summary: Get embeddings usage details for the organization. + operationId: usage-embeddings + parameters: + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' + required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string + responses: + '200': + description: Usage data retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UsageResponse' + x-oaiMeta: + name: Embeddings + group: usage-embeddings + returns: 'A list of paginated, time bucketed [Embeddings usage](/docs/api-reference/usage/embeddings_object) objects.' + examples: + request: + curl: "curl \"https://api.openai.com/v1/organization/usage/embeddings?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.embeddings.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/images: + get: + tags: + - Usage + summary: Get images usage details for the organization. + operationId: usage-images + parameters: + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' + required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: sources + in: query + description: 'Return only usages for these sources. Possible values are `image.generation`, `image.edit`, `image.variation` or any combination of them.' + schema: + type: array + items: + enum: + - image.generation + - image.edit + - image.variation + type: string + - name: sizes + in: query + description: 'Return only usages for these image sizes. Possible values are `256x256`, `512x512`, `1024x1024`, `1792x1792`, `1024x1792` or any combination of them.' + schema: + type: array + items: + enum: + - 256x256 + - 512x512 + - 1024x1024 + - 1792x1792 + - 1024x1792 + type: string + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model`, `size`, `source` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + - size + - source + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string + responses: + '200': + description: Usage data retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UsageResponse' + x-oaiMeta: + name: Images + group: usage-images + returns: 'A list of paginated, time bucketed [Images usage](/docs/api-reference/usage/images_object) objects.' + examples: + request: + curl: "curl \"https://api.openai.com/v1/organization/usage/images?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.images.result\",\n \"images\": 2,\n \"num_model_requests\": 2,\n \"size\": null,\n \"source\": null,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/moderations: + get: + tags: + - Usage + summary: Get moderations usage details for the organization. + operationId: usage-moderations + parameters: + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' + required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: user_ids + in: query + description: Return only usage for these users. + schema: + type: array + items: + type: string + - name: api_key_ids + in: query + description: Return only usage for these API keys. + schema: + type: array + items: + type: string + - name: models + in: query + description: Return only usage for these models. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: 'Group the usage data by the specified fields. Support fields include `project_id`, `user_id`, `api_key_id`, `model` or any combination of them.' + schema: + type: array + items: + enum: + - project_id + - user_id + - api_key_id + - model + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string + responses: + '200': + description: Usage data retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UsageResponse' + x-oaiMeta: + name: Moderations + group: usage-moderations + returns: 'A list of paginated, time bucketed [Moderations usage](/docs/api-reference/usage/moderations_object) objects.' + examples: + request: + curl: "curl \"https://api.openai.com/v1/organization/usage/moderations?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.moderations.result\",\n \"input_tokens\": 16,\n \"num_model_requests\": 2,\n \"project_id\": null,\n \"user_id\": null,\n \"api_key_id\": null,\n \"model\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" + /organization/usage/vector_stores: + get: + tags: + - Usage + summary: Get vector stores usage details for the organization. + operationId: usage-vector-stores + parameters: + - name: start_time + in: query + description: 'Start time (Unix seconds) of the query time range, inclusive.' + required: true + schema: + type: integer + - name: end_time + in: query + description: 'End time (Unix seconds) of the query time range, exclusive.' + schema: + type: integer + - name: bucket_width + in: query + description: 'Width of each time bucket in response. Currently `1m`, `1h` and `1d` are supported, default to `1d`.' + schema: + enum: + - 1m + - 1h + - 1d + type: string + default: 1d + - name: project_ids + in: query + description: Return only usage for these projects. + schema: + type: array + items: + type: string + - name: group_by + in: query + description: Group the usage data by the specified fields. Support fields include `project_id`. + schema: + type: array + items: + enum: + - project_id + type: string + - name: limit + in: query + description: "Specifies the number of buckets to return.\n- `bucket_width=1d`: default: 7, max: 31\n- `bucket_width=1h`: default: 24, max: 168\n- `bucket_width=1m`: default: 60, max: 1440\n" + schema: + type: integer + - name: page + in: query + description: A cursor for use in pagination. Corresponding to the `next_page` field from the previous response. + schema: + type: string + responses: + '200': + description: Usage data retrieved successfully. + content: + application/json: + schema: + $ref: '#/components/schemas/UsageResponse' + x-oaiMeta: + name: Vector stores + group: usage-vector-stores + returns: 'A list of paginated, time bucketed [Vector stores usage](/docs/api-reference/usage/vector_stores_object) objects.' + examples: + request: + curl: "curl \"https://api.openai.com/v1/organization/usage/vector_stores?start_time=1730419200&limit=1\" \\\n-H \"Authorization: Bearer $OPENAI_ADMIN_KEY\" \\\n-H \"Content-Type: application/json\"\n" + response: "{\n \"object\": \"page\",\n \"data\": [\n {\n \"object\": \"bucket\",\n \"start_time\": 1730419200,\n \"end_time\": 1730505600,\n \"results\": [\n {\n \"object\": \"orgainzation.usage.vector_stores.result\",\n \"usage_bytes\": 1024,\n \"project_id\": null\n }\n ]\n }\n ],\n \"has_more\": false,\n \"next_page\": null\n}\n" /organization/users: get: tags: @@ -5153,6 +5950,36 @@ components: description: Cached tokens present in the prompt. description: Breakdown of tokens used in the prompt. description: Usage statistics for the completion request. + CostsResult: + required: + - object + - sessions + type: object + properties: + object: + enum: + - organization.costs.result + type: string + amount: + type: object + properties: + value: + type: number + description: The numeric value of the cost. + currency: + type: string + description: Lowercase ISO-4217 currency e.g. "usd" + description: The monetary value in its associated currency. + line_item: + type: string + description: 'When `group_by=line_item`, this field provides the line item of the grouped costs result.' + project_id: + type: string + description: 'When `group_by=project_id`, this field provides the project ID of the grouped costs result.' + description: The aggregated costs details of the specific time bucket. + x-oaiMeta: + name: Costs object + example: "{\n \"object\": \"orgainzation.costs.result\",\n \"amount\": {\n \"value\": 0.06,\n \"currency\": \"usd\"\n },\n \"line_item\": \"Image models\",\n \"project_id\": \"proj_abc\"\n}\n" CreateAssistantRequest: required: - model @@ -5163,6 +5990,7 @@ components: - type: string - enum: - gpt-4o + - gpt-4o-2024-11-20 - gpt-4o-2024-08-06 - gpt-4o-2024-05-13 - gpt-4o-mini @@ -5412,6 +6240,7 @@ components: - 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-realtime-preview @@ -5523,7 +6352,7 @@ components: - shimmer - verse type: string - description: "The voice the model uses to respond. Supported voices are `alloy`,\n`ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, and `verse`.\n" + description: "The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive).\n" format: enum: - wav @@ -6873,6 +7702,7 @@ components: - type: string - enum: - gpt-4o + - gpt-4o-2024-11-20 - gpt-4o-2024-08-06 - gpt-4o-2024-05-13 - gpt-4o-mini @@ -7032,6 +7862,7 @@ components: - type: string - enum: - gpt-4o + - gpt-4o-2024-11-20 - gpt-4o-2024-08-06 - gpt-4o-2024-05-13 - gpt-4o-mini @@ -9059,7 +9890,7 @@ components: description: Describes an OpenAI model offering that can be used with the API. x-oaiMeta: name: The model object - example: "{\n \"id\": \"VAR_model_id\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n}\n" + example: "{\n \"id\": \"VAR_chat_model_id\",\n \"object\": \"model\",\n \"created\": 1686935002,\n \"owned_by\": \"openai\"\n}\n" ModifyAssistantRequest: type: object properties: @@ -9768,14 +10599,16 @@ components: type: string description: Optional client-generated ID used to identify this event. type: + enum: + - conversation.item.create type: string description: 'The event type, must be `conversation.item.create`.' previous_item_id: type: string - description: 'The ID of the preceding item after which the new item will be inserted. If not set, the new item will be appended to the end of the conversation. If set, it allows an item to be inserted mid-conversation. If the ID cannot be found, an error will be returned and the item will not be added.' + description: "The ID of the preceding item after which the new item will be inserted. \nIf not set, the new item will be appended to the end of the conversation. \nIf set, it allows an item to be inserted mid-conversation. If the ID \ncannot be found, an error will be returned and the item will not be added.\n" item: $ref: '#/components/schemas/RealtimeConversationItem' - description: "Add a new Item to the Conversation's context, including messages, function calls, and function call responses. This event can be used both to populate a \"history\" of the conversation and to add new items mid-stream, but has the current limitation that it cannot populate assistant audio messages.\nIf successful, the server will respond with a `conversation.item.created` event, otherwise an `error` event will be sent." + description: "Add a new Item to the Conversation's context, including messages, function \ncalls, and function call responses. This event can be used both to populate a \n\"history\" of the conversation and to add new items mid-stream, but has the \ncurrent limitation that it cannot populate assistant audio messages.\n\nIf successful, the server will respond with a `conversation.item.created` \nevent, otherwise an `error` event will be sent.\n" x-oaiMeta: name: conversation.item.create group: realtime @@ -9790,12 +10623,14 @@ components: type: string description: Optional client-generated ID used to identify this event. type: + enum: + - conversation.item.delete type: string - description: 'The event type, must be "conversation.item.delete".' + description: 'The event type, must be `conversation.item.delete`.' item_id: type: string description: The ID of the item to delete. - description: 'Send this event when you want to remove any item from the conversation history. The server will respond with a `conversation.item.deleted` event, unless the item does not exist in the conversation history, in which case the server will respond with an error.' + description: "Send this event when you want to remove any item from the conversation \nhistory. The server will respond with a `conversation.item.deleted` event, \nunless the item does not exist in the conversation history, in which case the \nserver will respond with an error.\n" x-oaiMeta: name: conversation.item.delete group: realtime @@ -9812,18 +10647,20 @@ components: type: string description: Optional client-generated ID used to identify this event. type: + enum: + - conversation.item.truncate type: string - description: 'The event type, must be "conversation.item.truncate".' + description: 'The event type, must be `conversation.item.truncate`.' item_id: type: string - description: The ID of the assistant message item to truncate. Only assistant message items can be truncated. + description: "The ID of the assistant message item to truncate. Only assistant message \nitems can be truncated.\n" content_index: type: integer description: The index of the content part to truncate. Set this to 0. audio_end_ms: type: integer - description: 'Inclusive duration up to which audio is truncated, in milliseconds. If the audio_end_ms is greater than the actual audio duration, the server will respond with an error.' - description: "Send this event to truncate a previous assistant message’s audio. The server will produce audio faster than realtime, so this event is useful when the user interrupts to truncate audio that has already been sent to the client but not yet played. This will synchronize the server's understanding of the audio with the client's playback.\nTruncating audio will delete the server-side text transcript to ensure there is not text in the context that hasn't been heard by the user.\nIf successful, the server will respond with a `conversation.item.truncated` event. " + description: "Inclusive duration up to which audio is truncated, in milliseconds. If \nthe audio_end_ms is greater than the actual audio duration, the server \nwill respond with an error.\n" + description: "Send this event to truncate a previous assistant message’s audio. The server \nwill produce audio faster than realtime, so this event is useful when the user \ninterrupts to truncate audio that has already been sent to the client but not \nyet played. This will synchronize the server's understanding of the audio with \nthe client's playback.\n\nTruncating audio will delete the server-side text transcript to ensure there \nis not text in the context that hasn't been heard by the user.\n\nIf successful, the server will respond with a `conversation.item.truncated` \nevent. \n" x-oaiMeta: name: conversation.item.truncate group: realtime @@ -9838,12 +10675,14 @@ components: type: string description: Optional client-generated ID used to identify this event. type: + enum: + - input_audio_buffer.append type: string - description: 'The event type, must be "input_audio_buffer.append".' + description: 'The event type, must be `input_audio_buffer.append`.' audio: type: string - description: Base64-encoded audio bytes. This must be in the format specified by the `input_audio_format` field in the session configuration. - description: "Send this event to append audio bytes to the input audio buffer. The audio buffer is temporary storage you can write to and later commit. In Server VAD mode, the audio buffer is used to detect speech and the server will decide when to commit. When Server VAD is disabled, you must commit the audio buffer manually.\nThe client may choose how much audio to place in each event up to a maximum of 15 MiB, for example streaming smaller chunks from the client may allow the VAD to be more responsive. Unlike made other client events, the server will not send a confirmation response to this event." + description: "Base64-encoded audio bytes. This must be in the format specified by the \n`input_audio_format` field in the session configuration.\n" + description: "Send this event to append audio bytes to the input audio buffer. The audio \nbuffer is temporary storage you can write to and later commit. In Server VAD \nmode, the audio buffer is used to detect speech and the server will decide \nwhen to commit. When Server VAD is disabled, you must commit the audio buffer\nmanually.\n\nThe client may choose how much audio to place in each event up to a maximum \nof 15 MiB, for example streaming smaller chunks from the client may allow the \nVAD to be more responsive. Unlike made other client events, the server will \nnot send a confirmation response to this event.\n" x-oaiMeta: name: input_audio_buffer.append group: realtime @@ -9857,9 +10696,11 @@ components: type: string description: Optional client-generated ID used to identify this event. type: + enum: + - input_audio_buffer.clear type: string - description: 'The event type, must be "input_audio_buffer.clear".' - description: Send this event to clear the audio bytes in the buffer. The server will respond with an `input_audio_buffer.cleared` event. + description: 'The event type, must be `input_audio_buffer.clear`.' + description: "Send this event to clear the audio bytes in the buffer. The server will \nrespond with an `input_audio_buffer.cleared` event.\n" x-oaiMeta: name: input_audio_buffer.clear group: realtime @@ -9873,9 +10714,11 @@ components: type: string description: Optional client-generated ID used to identify this event. type: + enum: + - input_audio_buffer.commit type: string - description: 'The event type, must be "input_audio_buffer.commit".' - description: "Send this event to commit the user input audio buffer, which will create a new user message item in the conversation. This event will produce an error if the input audio buffer is empty. When in Server VAD mode, the client does not need to send this event, the server will commit the audio buffer automatically.\nCommitting the input audio buffer will trigger input audio transcription (if enabled in session configuration), but it will not create a response from the model. The server will respond with an `input_audio_buffer.committed` event." + description: 'The event type, must be `input_audio_buffer.commit`.' + description: "Send this event to commit the user input audio buffer, which will create a \nnew user message item in the conversation. This event will produce an error \nif the input audio buffer is empty. When in Server VAD mode, the client does \nnot need to send this event, the server will commit the audio buffer \nautomatically.\n\nCommitting the input audio buffer will trigger input audio transcription \n(if enabled in session configuration), but it will not create a response \nfrom the model. The server will respond with an `input_audio_buffer.committed` \nevent.\n" x-oaiMeta: name: input_audio_buffer.commit group: realtime @@ -9889,9 +10732,11 @@ components: type: string description: Optional client-generated ID used to identify this event. type: + enum: + - response.cancel type: string description: 'The event type, must be `response.cancel`.' - description: Send this event to cancel an in-progress response. The server will respond with a `response.cancelled` event or an error if there is no response to cancel. + description: "Send this event to cancel an in-progress response. The server will respond \nwith a `response.cancelled` event or an error if there is no response to \ncancel.\n" x-oaiMeta: name: response.cancel group: realtime @@ -9906,15 +10751,17 @@ components: type: string description: Optional client-generated ID used to identify this event. type: + enum: + - response.create type: string description: 'The event type, must be `response.create`.' response: - $ref: '#/components/schemas/RealtimeResponse' - description: "This event instructs the server to create a Response, which means triggering model inference. When in Server VAD mode, the server will create Responses automatically.\nA Response will include at least one Item, and may have two, in which case the second will be a function call. These Items will be appended to the conversation history.\nThe server will respond with a `response.created` event, events for Items and content created, and finally a `response.done` event to indicate the Response is complete.\nThe `response.create` event includes inference configuration like `instructions`, and `temperature`. These fields will override the Session's configuration for this Response only." + $ref: '#/components/schemas/RealtimeSession' + description: "This event instructs the server to create a Response, which means triggering \nmodel inference. When in Server VAD mode, the server will create Responses \nautomatically.\n\nA Response will include at least one Item, and may have two, in which case \nthe second will be a function call. These Items will be appended to the \nconversation history.\n\nThe server will respond with a `response.created` event, events for Items \nand content created, and finally a `response.done` event to indicate the \nResponse is complete.\n\nThe `response.create` event includes inference configuration like \n`instructions`, and `temperature`. These fields will override the Session's \nconfiguration for this Response only.\n" x-oaiMeta: name: response.create group: realtime - example: "{\n \"event_id\": \"event_234\",\n \"type\": \"response.create\",\n \"response\": {\n \"modalities\": [\"text\", \"audio\"],\n \"instructions\": \"Please assist the user.\",\n \"voice\": \"alloy\",\n \"output_audio_format\": \"pcm16\",\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"calculate_sum\",\n \"description\": \"Calculates the sum of two numbers.\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"a\": { \"type\": \"number\" },\n \"b\": { \"type\": \"number\" }\n },\n \"required\": [\"a\", \"b\"]\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"temperature\": 0.7,\n \"max_output_tokens\": 150\n }\n}\n" + example: "{\n \"event_id\": \"event_234\",\n \"type\": \"response.create\",\n \"response\": {\n \"modalities\": [\"text\", \"audio\"],\n \"instructions\": \"Please assist the user.\",\n \"voice\": \"sage\",\n \"output_audio_format\": \"pcm16\",\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"calculate_sum\",\n \"description\": \"Calculates the sum of two numbers.\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"a\": { \"type\": \"number\" },\n \"b\": { \"type\": \"number\" }\n },\n \"required\": [\"a\", \"b\"]\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"temperature\": 0.7,\n \"max_output_tokens\": 150\n }\n}\n" RealtimeClientEventSessionUpdate: required: - type @@ -9925,15 +10772,17 @@ components: type: string description: Optional client-generated ID used to identify this event. type: + enum: + - session.update type: string - description: 'The event type, must be "session.update".' + description: 'The event type, must be `session.update`.' session: $ref: '#/components/schemas/RealtimeSession' - description: 'Send this event to update the session’s default configuration. The client may send this event at any time to update the session configuration, and any field may be updated at any time, except for "voice". The server will respond with a `session.updated` event that shows the full effective configuration. Only fields that are present are updated, thus the correct way to clear a field like "instructions" is to pass an empty string.' + description: "Send this event to update the session’s default configuration. The client may \nsend this event at any time to update the session configuration, and any \nfield may be updated at any time, except for \"voice\". The server will respond \nwith a `session.updated` event that shows the full effective configuration. \nOnly fields that are present are updated, thus the correct way to clear a \nfield like \"instructions\" is to pass an empty string.\n" x-oaiMeta: name: session.update group: realtime - example: "{\n \"event_id\": \"event_123\",\n \"type\": \"session.update\",\n \"session\": {\n \"modalities\": [\"text\", \"audio\"],\n \"instructions\": \"Your knowledge cutoff is 2023-10. You are a helpful assistant.\",\n \"voice\": \"alloy\",\n \"input_audio_format\": \"pcm16\",\n \"output_audio_format\": \"pcm16\",\n \"input_audio_transcription\": {\n \"model\": \"whisper-1\"\n },\n \"turn_detection\": {\n \"type\": \"server_vad\",\n \"threshold\": 0.5,\n \"prefix_padding_ms\": 300,\n \"silence_duration_ms\": 500\n },\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"get_weather\",\n \"description\": \"Get the current weather for a location, tell the user you are fetching the weather.\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": { \"type\": \"string\" }\n },\n \"required\": [\"location\"]\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"temperature\": 0.8,\n \"max_response_output_tokens\": \"inf\"\n }\n}\n" + example: "{\n \"event_id\": \"event_123\",\n \"type\": \"session.update\",\n \"session\": {\n \"modalities\": [\"text\", \"audio\"],\n \"instructions\": \"You are a helpful assistant.\",\n \"voice\": \"sage\",\n \"input_audio_format\": \"pcm16\",\n \"output_audio_format\": \"pcm16\",\n \"input_audio_transcription\": {\n \"model\": \"whisper-1\"\n },\n \"turn_detection\": {\n \"type\": \"server_vad\",\n \"threshold\": 0.5,\n \"prefix_padding_ms\": 300,\n \"silence_duration_ms\": 500\n },\n \"tools\": [\n {\n \"type\": \"function\",\n \"name\": \"get_weather\",\n \"description\": \"Get the current weather...\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"location\": { \"type\": \"string\" }\n },\n \"required\": [\"location\"]\n }\n }\n ],\n \"tool_choice\": \"auto\",\n \"temperature\": 0.8,\n \"max_response_output_tokens\": \"inf\"\n }\n}\n" RealtimeConversationItem: type: object properties: @@ -10069,8 +10918,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - conversation.created type: string - description: 'The event type, must be "conversation.created".' + description: 'The event type, must be `conversation.created`.' conversation: type: object properties: @@ -10079,9 +10930,9 @@ components: description: The unique ID of the conversation. object: type: string - description: 'The object type, must be "realtime.conversation".' + description: 'The object type, must be `realtime.conversation`.' description: The conversation resource. - description: Returned when a conversation is created. Emitted right after session creation. + description: "Returned when a conversation is created. Emitted right after session creation.\n" x-oaiMeta: name: conversation.created group: realtime @@ -10098,14 +10949,16 @@ components: type: string description: The unique ID of the server event. type: + enum: + - conversation.item.created type: string description: 'The event type, must be `conversation.item.created`.' previous_item_id: type: string - description: 'The ID of the preceding item in the Conversation context, allows the client to understand the order of the conversation.' + description: "The ID of the preceding item in the Conversation context, allows the \nclient to understand the order of the conversation.\n" item: $ref: '#/components/schemas/RealtimeConversationItem' - description: "Returned when a conversation item is created. There are several scenarios that produce this event:\n - The server is generating a Response, which if successful will produce either one or two Items, which will be of type `message` (role `assistant`) or type `function_call`.\n - The input audio buffer has been committed, either by the client or the server (in `server_vad` mode). The server will take the content of the input audio buffer and add it to a new user message Item.\n - The client has sent a `conversation.item.create` event to add a new Item to the Conversation." + description: "Returned when a conversation item is created. There are several scenarios that \nproduce this event:\n - The server is generating a Response, which if successful will produce \n either one or two Items, which will be of type `message` \n (role `assistant`) or type `function_call`.\n - The input audio buffer has been committed, either by the client or the \n server (in `server_vad` mode). The server will take the content of the \n input audio buffer and add it to a new user message Item.\n - The client has sent a `conversation.item.create` event to add a new Item \n to the Conversation.\n" x-oaiMeta: name: conversation.item.created group: realtime @@ -10121,12 +10974,14 @@ components: type: string description: The unique ID of the server event. type: + enum: + - conversation.item.deleted type: string description: 'The event type, must be `conversation.item.deleted`.' item_id: type: string description: The ID of the item that was deleted. - description: Returned when an item in the conversation is deleted by the client with a `conversation.item.delete` event. This event is used to synchronize the server's understanding of the conversation history with the client's view. + description: "Returned when an item in the conversation is deleted by the client with a \n`conversation.item.delete` event. This event is used to synchronize the \nserver's understanding of the conversation history with the client's view.\n" x-oaiMeta: name: conversation.item.deleted group: realtime @@ -10144,8 +10999,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - conversation.item.input_audio_transcription.completed type: string - description: 'The event type, must be `conversation.item.input_audio_transcription.completed`.' + description: "The event type, must be\n`conversation.item.input_audio_transcription.completed`.\n" item_id: type: string description: The ID of the user message item containing the audio. @@ -10155,7 +11012,7 @@ components: transcript: type: string description: The transcribed text. - description: "This event is the output of audio transcription for user audio written to the user audio buffer. Transcription begins when the input audio buffer is committed by the client or server (in `server_vad` mode). Transcription runs asynchronously with Response creation, so this event may come before or after the Response events.\nRealtime API models accept audio natively, and thus input transcription is a separate process run on a separate ASR (Automatic Speech Recognition) model, currently always `whisper-1`. Thus the transcript may diverge somewhat from the model's interpretation, and should be treated as a rough guide." + description: "This event is the output of audio transcription for user audio written to the \nuser audio buffer. Transcription begins when the input audio buffer is \ncommitted by the client or server (in `server_vad` mode). Transcription runs \nasynchronously with Response creation, so this event may come before or after \nthe Response events.\n\nRealtime API models accept audio natively, and thus input transcription is a \nseparate process run on a separate ASR (Automatic Speech Recognition) model, \ncurrently always `whisper-1`. Thus the transcript may diverge somewhat from \nthe model's interpretation, and should be treated as a rough guide.\n" x-oaiMeta: name: conversation.item.input_audio_transcription.completed group: realtime @@ -10173,8 +11030,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - conversation.item.input_audio_transcription.failed type: string - description: 'The event type, must be `conversation.item.input_audio_transcription.failed`.' + description: "The event type, must be\n`conversation.item.input_audio_transcription.failed`.\n" item_id: type: string description: The ID of the user message item. @@ -10197,7 +11056,7 @@ components: type: string description: 'Parameter related to the error, if any.' description: Details of the transcription error. - description: 'Returned when input audio transcription is configured, and a transcription request for a user message failed. These events are separate from other `error` events so that the client can identify the related Item.' + description: "Returned when input audio transcription is configured, and a transcription \nrequest for a user message failed. These events are separate from other \n`error` events so that the client can identify the related Item.\n" x-oaiMeta: name: conversation.item.input_audio_transcription.failed group: realtime @@ -10215,6 +11074,8 @@ components: type: string description: The unique ID of the server event. type: + enum: + - conversation.item.truncated type: string description: 'The event type, must be `conversation.item.truncated`.' item_id: @@ -10225,8 +11086,8 @@ components: description: The index of the content part that was truncated. audio_end_ms: type: integer - description: 'The duration up to which the audio was truncated, in milliseconds.' - description: "Returned when an earlier assistant audio message item is truncated by the client with a `conversation.item.truncate` event. This event is used to synchronize the server's understanding of the audio with the client's playback.\nThis action will truncate the audio and remove the server-side text transcript to ensure there is no text in the context that hasn't been heard by the user." + description: "The duration up to which the audio was truncated, in milliseconds.\n" + description: "Returned when an earlier assistant audio message item is truncated by the \nclient with a `conversation.item.truncate` event. This event is used to \nsynchronize the server's understanding of the audio with the client's playback.\n\nThis action will truncate the audio and remove the server-side text transcript \nto ensure there is no text in the context that hasn't been heard by the user.\n" x-oaiMeta: name: conversation.item.truncated group: realtime @@ -10242,14 +11103,16 @@ components: type: string description: The unique ID of the server event. type: + enum: + - error type: string - description: 'The event type, must be "error".' + description: 'The event type, must be `error`.' error: type: object properties: type: type: string - description: 'The type of error (e.g., "invalid_request_error", "server_error").' + description: "The type of error (e.g., \"invalid_request_error\", \"server_error\").\n" code: type: string description: 'Error code, if any.' @@ -10261,9 +11124,9 @@ components: description: 'Parameter related to the error, if any.' event_id: type: string - description: 'The event_id of the client event that caused the error, if applicable.' + description: "The event_id of the client event that caused the error, if applicable.\n" description: Details of the error. - description: 'Returned when an error occurs, which could be a client problem or a server problem. Most errors are recoverable and the session will stay open, we recommend to implementors to monitor and log error messages by default.' + description: "Returned when an error occurs, which could be a client problem or a server \nproblem. Most errors are recoverable and the session will stay open, we \nrecommend to implementors to monitor and log error messages by default.\n" x-oaiMeta: name: error group: realtime @@ -10278,9 +11141,11 @@ components: type: string description: The unique ID of the server event. type: + enum: + - input_audio_buffer.cleared type: string description: 'The event type, must be `input_audio_buffer.cleared`.' - description: Returned when the input audio buffer is cleared by the client with a `input_audio_buffer.clear` event. + description: "Returned when the input audio buffer is cleared by the client with a \n`input_audio_buffer.clear` event.\n" x-oaiMeta: name: input_audio_buffer.cleared group: realtime @@ -10297,15 +11162,17 @@ components: type: string description: The unique ID of the server event. type: + enum: + - input_audio_buffer.committed type: string description: 'The event type, must be `input_audio_buffer.committed`.' previous_item_id: type: string - description: The ID of the preceding item after which the new item will be inserted. + description: "The ID of the preceding item after which the new item will be inserted.\n" item_id: type: string description: The ID of the user message item that will be created. - description: 'Returned when an input audio buffer is committed, either by the client or automatically in server VAD mode. The `item_id` property is the ID of the user message item that will be created, thus a `conversation.item.created` event will also be sent to the client.' + description: "Returned when an input audio buffer is committed, either by the client or \nautomatically in server VAD mode. The `item_id` property is the ID of the user\nmessage item that will be created, thus a `conversation.item.created` event \nwill also be sent to the client.\n" x-oaiMeta: name: input_audio_buffer.committed group: realtime @@ -10322,15 +11189,17 @@ components: type: string description: The unique ID of the server event. type: + enum: + - input_audio_buffer.speech_started type: string description: 'The event type, must be `input_audio_buffer.speech_started`.' audio_start_ms: type: integer - description: 'Milliseconds from the start of all audio written to the buffer during the session when speech was first detected. This will correspond to the beginning of audio sent to the model, and thus includes the `prefix_padding_ms` configured in the Session.' + description: "Milliseconds from the start of all audio written to the buffer during the \nsession when speech was first detected. This will correspond to the \nbeginning of audio sent to the model, and thus includes the \n`prefix_padding_ms` configured in the Session.\n" item_id: type: string - description: The ID of the user message item that will be created when speech stops. - description: Sent by the server when in `server_vad` mode to indicate that speech has been detected in the audio buffer. This can happen any time audio is added to the buffer (unless speech is already detected). The client may want to use this event to interrupt audio playback or provide visual feedback to the user. The client should expect to receive a `input_audio_buffer.speech_stopped` event when speech stops. The `item_id` property is the ID of the user message item that will be created when speech stops and will also be included in the `input_audio_buffer.speech_stopped` event (unless the client manually commits the audio buffer during VAD activation). + description: "The ID of the user message item that will be created when speech stops.\n" + description: "Sent by the server when in `server_vad` mode to indicate that speech has been \ndetected in the audio buffer. This can happen any time audio is added to the \nbuffer (unless speech is already detected). The client may want to use this \nevent to interrupt audio playback or provide visual feedback to the user. \n\nThe client should expect to receive a `input_audio_buffer.speech_stopped` event \nwhen speech stops. The `item_id` property is the ID of the user message item \nthat will be created when speech stops and will also be included in the \n`input_audio_buffer.speech_stopped` event (unless the client manually commits \nthe audio buffer during VAD activation).\n" x-oaiMeta: name: input_audio_buffer.speech_started group: realtime @@ -10347,15 +11216,17 @@ components: type: string description: The unique ID of the server event. type: + enum: + - input_audio_buffer.speech_stopped type: string description: 'The event type, must be `input_audio_buffer.speech_stopped`.' audio_end_ms: type: integer - description: 'Milliseconds since the session started when speech stopped. This will correspond to the end of audio sent to the model, and thus includes the `min_silence_duration_ms` configured in the Session.' + description: "Milliseconds since the session started when speech stopped. This will \ncorrespond to the end of audio sent to the model, and thus includes the \n`min_silence_duration_ms` configured in the Session.\n" item_id: type: string description: The ID of the user message item that will be created. - description: Returned in `server_vad` mode when the server detects the end of speech in the audio buffer. The server will also send an `conversation.item.created` event with the user message item that is created from the audio buffer. + description: "Returned in `server_vad` mode when the server detects the end of speech in \nthe audio buffer. The server will also send an `conversation.item.created` \nevent with the user message item that is created from the audio buffer.\n" x-oaiMeta: name: input_audio_buffer.speech_stopped group: realtime @@ -10371,6 +11242,8 @@ components: type: string description: The unique ID of the server event. type: + enum: + - rate_limits.updated type: string description: 'The event type, must be `rate_limits.updated`.' rate_limits: @@ -10391,7 +11264,7 @@ components: type: number description: Seconds until the rate limit resets. description: List of rate limit information. - description: 'Emitted at the beginning of a Response to indicate the updated rate limits. When a Response is created some tokens will be "reserved" for the output tokens, the rate limits shown here reflect that reservation, which is then adjusted accordingly once the Response is completed.' + description: "Emitted at the beginning of a Response to indicate the updated rate limits. \nWhen a Response is created some tokens will be \"reserved\" for the output \ntokens, the rate limits shown here reflect that reservation, which is then \nadjusted accordingly once the Response is completed.\n" x-oaiMeta: name: rate_limits.updated group: realtime @@ -10411,8 +11284,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.audio.delta type: string - description: 'The event type, must be "response.audio.delta".' + description: 'The event type, must be `response.audio.delta`.' response_id: type: string description: The ID of the response. @@ -10447,8 +11322,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.audio.done type: string - description: 'The event type, must be "response.audio.done".' + description: 'The event type, must be `response.audio.done`.' response_id: type: string description: The ID of the response. @@ -10461,7 +11338,7 @@ components: content_index: type: integer description: The index of the content part in the item's content array. - description: 'Returned when the model-generated audio is done. Also emitted when a Response is interrupted, incomplete, or cancelled.' + description: "Returned when the model-generated audio is done. Also emitted when a Response\nis interrupted, incomplete, or cancelled.\n" x-oaiMeta: name: response.audio.done group: realtime @@ -10481,8 +11358,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.audio_transcript.delta type: string - description: 'The event type, must be "response.audio_transcript.delta".' + description: 'The event type, must be `response.audio_transcript.delta`.' response_id: type: string description: The ID of the response. @@ -10498,7 +11377,7 @@ components: delta: type: string description: The transcript delta. - description: Returned when the model-generated transcription of audio output is updated. + description: "Returned when the model-generated transcription of audio output is updated.\n" x-oaiMeta: name: response.audio_transcript.delta group: realtime @@ -10518,8 +11397,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.audio_transcript.done type: string - description: 'The event type, must be "response.audio_transcript.done".' + description: 'The event type, must be `response.audio_transcript.done`.' response_id: type: string description: The ID of the response. @@ -10535,7 +11416,7 @@ components: transcript: type: string description: The final transcript of the audio. - description: 'Returned when the model-generated transcription of audio output is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.' + description: "Returned when the model-generated transcription of audio output is done\nstreaming. Also emitted when a Response is interrupted, incomplete, or\ncancelled.\n" x-oaiMeta: name: response.audio_transcript.done group: realtime @@ -10555,8 +11436,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.content_part.added type: string - description: 'The event type, must be "response.content_part.added".' + description: 'The event type, must be `response.content_part.added`.' response_id: type: string description: The ID of the response. @@ -10573,6 +11456,9 @@ components: type: object properties: type: + enum: + - audio + - text type: string description: 'The content type ("text", "audio").' text: @@ -10585,7 +11471,7 @@ components: type: string description: The transcript of the audio (if type is "audio"). description: The content part that was added. - description: Returned when a new content part is added to an assistant message item during response generation. + description: "Returned when a new content part is added to an assistant message item during\nresponse generation.\n" x-oaiMeta: name: response.content_part.added group: realtime @@ -10605,8 +11491,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.content_part.done type: string - description: 'The event type, must be "response.content_part.done".' + description: 'The event type, must be `response.content_part.done`.' response_id: type: string description: The ID of the response. @@ -10635,7 +11523,7 @@ components: type: string description: The transcript of the audio (if type is "audio"). description: The content part that is done. - description: 'Returned when a content part is done streaming in an assistant message item. Also emitted when a Response is interrupted, incomplete, or cancelled.' + description: "Returned when a content part is done streaming in an assistant message item.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.\n" x-oaiMeta: name: response.content_part.done group: realtime @@ -10651,11 +11539,13 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.created type: string description: 'The event type, must be `response.created`.' response: $ref: '#/components/schemas/RealtimeResponse' - description: 'Returned when a new Response is created. The first event of response creation, where the response is in an initial state of `in_progress`.' + description: "Returned when a new Response is created. The first event of response creation,\nwhere the response is in an initial state of `in_progress`.\n" x-oaiMeta: name: response.created group: realtime @@ -10671,11 +11561,13 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.done type: string - description: 'The event type, must be "response.done".' + description: 'The event type, must be `response.done`.' response: $ref: '#/components/schemas/RealtimeResponse' - description: 'Returned when a Response is done streaming. Always emitted, no matter the final state. The Response object included in the `response.done` event will include all output Items in the Response but will omit the raw audio data.' + description: "Returned when a Response is done streaming. Always emitted, no matter the \nfinal state. The Response object included in the `response.done` event will \ninclude all output Items in the Response but will omit the raw audio data.\n" x-oaiMeta: name: response.done group: realtime @@ -10695,8 +11587,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.function_call_arguments.delta type: string - description: 'The event type, must be "response.function_call_arguments.delta".' + description: "The event type, must be `response.function_call_arguments.delta`.\n" response_id: type: string description: The ID of the response. @@ -10712,7 +11606,7 @@ components: delta: type: string description: The arguments delta as a JSON string. - description: Returned when the model-generated function call arguments are updated. + description: "Returned when the model-generated function call arguments are updated.\n" x-oaiMeta: name: response.function_call_arguments.delta group: realtime @@ -10732,8 +11626,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.function_call_arguments.done type: string - description: 'The event type, must be "response.function_call_arguments.done".' + description: "The event type, must be `response.function_call_arguments.done`.\n" response_id: type: string description: The ID of the response. @@ -10749,7 +11645,7 @@ components: arguments: type: string description: The final arguments as a JSON string. - description: 'Returned when the model-generated function call arguments are done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.' + description: "Returned when the model-generated function call arguments are done streaming.\nAlso emitted when a Response is interrupted, incomplete, or cancelled.\n" x-oaiMeta: name: response.function_call_arguments.done group: realtime @@ -10767,6 +11663,8 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.output_item.added type: string description: 'The event type, must be `response.output_item.added`.' response_id: @@ -10795,6 +11693,8 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.output_item.done type: string description: 'The event type, must be `response.output_item.done`.' response_id: @@ -10805,7 +11705,7 @@ components: description: The index of the output item in the Response. item: $ref: '#/components/schemas/RealtimeConversationItem' - description: 'Returned when an Item is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.' + description: "Returned when an Item is done streaming. Also emitted when a Response is \ninterrupted, incomplete, or cancelled.\n" x-oaiMeta: name: response.output_item.done group: realtime @@ -10825,8 +11725,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.text.delta type: string - description: 'The event type, must be "response.text.delta".' + description: 'The event type, must be `response.text.delta`.' response_id: type: string description: The ID of the response. @@ -10862,8 +11764,10 @@ components: type: string description: The unique ID of the server event. type: + enum: + - response.text.done type: string - description: 'The event type, must be "response.text.done".' + description: 'The event type, must be `response.text.done`.' response_id: type: string description: The ID of the response. @@ -10879,7 +11783,7 @@ components: text: type: string description: The final text content. - description: 'Returned when the text value of a "text" content part is done streaming. Also emitted when a Response is interrupted, incomplete, or cancelled.' + description: "Returned when the text value of a \"text\" content part is done streaming. Also\nemitted when a Response is interrupted, incomplete, or cancelled.\n" x-oaiMeta: name: response.text.done group: realtime @@ -10895,15 +11799,17 @@ components: type: string description: The unique ID of the server event. type: + enum: + - session.created type: string description: 'The event type, must be `session.created`.' session: $ref: '#/components/schemas/RealtimeSession' - description: Returned when a Session is created. Emitted automatically when a new connection is established as the first server event. This event will contain the default Session configuration. + description: "Returned when a Session is created. Emitted automatically when a new \nconnection is established as the first server event. This event will contain \nthe default Session configuration.\n" x-oaiMeta: name: session.created group: realtime - example: "{\n \"event_id\": \"event_1234\",\n \"type\": \"session.created\",\n \"session\": {\n \"id\": \"sess_001\",\n \"object\": \"realtime.session\",\n \"model\": \"gpt-4o-realtime-preview-2024-10-01\",\n \"modalities\": [\"text\", \"audio\"],\n \"instructions\": \"\",\n \"voice\": \"alloy\",\n \"input_audio_format\": \"pcm16\",\n \"output_audio_format\": \"pcm16\",\n \"input_audio_transcription\": null,\n \"turn_detection\": {\n \"type\": \"server_vad\",\n \"threshold\": 0.5,\n \"prefix_padding_ms\": 300,\n \"silence_duration_ms\": 200\n },\n \"tools\": [],\n \"tool_choice\": \"auto\",\n \"temperature\": 0.8,\n \"max_response_output_tokens\": null\n }\n}\n" + example: "{\n \"event_id\": \"event_1234\",\n \"type\": \"session.created\",\n \"session\": {\n \"id\": \"sess_001\",\n \"object\": \"realtime.session\",\n \"model\": \"gpt-4o-realtime-preview-2024-10-01\",\n \"modalities\": [\"text\", \"audio\"],\n \"instructions\": \"...model instructions here...\",\n \"voice\": \"sage\",\n \"input_audio_format\": \"pcm16\",\n \"output_audio_format\": \"pcm16\",\n \"input_audio_transcription\": null,\n \"turn_detection\": {\n \"type\": \"server_vad\",\n \"threshold\": 0.5,\n \"prefix_padding_ms\": 300,\n \"silence_duration_ms\": 200\n },\n \"tools\": [],\n \"tool_choice\": \"auto\",\n \"temperature\": 0.8,\n \"max_response_output_tokens\": \"inf\"\n }\n}\n" RealtimeServerEventSessionUpdated: required: - event_id @@ -10915,15 +11821,17 @@ components: type: string description: The unique ID of the server event. type: + enum: + - session.updated type: string - description: 'The event type, must be "session.updated".' + description: 'The event type, must be `session.updated`.' session: $ref: '#/components/schemas/RealtimeSession' - description: 'Returned when a session is updated with a `session.update` event, unless there is an error.' + description: "Returned when a session is updated with a `session.update` event, unless \nthere is an error.\n" x-oaiMeta: name: session.updated group: realtime - example: "{\n \"event_id\": \"event_5678\",\n \"type\": \"session.updated\",\n \"session\": {\n \"id\": \"sess_001\",\n \"object\": \"realtime.session\",\n \"model\": \"gpt-4o-realtime-preview-2024-10-01\",\n \"modalities\": [\"text\"],\n \"instructions\": \"New instructions\",\n \"voice\": \"alloy\",\n \"input_audio_format\": \"pcm16\",\n \"output_audio_format\": \"pcm16\",\n \"input_audio_transcription\": {\n \"model\": \"whisper-1\"\n },\n \"turn_detection\": null,\n \"tools\": [],\n \"tool_choice\": \"none\",\n \"temperature\": 0.7,\n \"max_response_output_tokens\": 200\n }\n}\n" + example: "{\n \"event_id\": \"event_5678\",\n \"type\": \"session.updated\",\n \"session\": {\n \"id\": \"sess_001\",\n \"object\": \"realtime.session\",\n \"model\": \"gpt-4o-realtime-preview-2024-10-01\",\n \"modalities\": [\"text\"],\n \"instructions\": \"New instructions\",\n \"voice\": \"sage\",\n \"input_audio_format\": \"pcm16\",\n \"output_audio_format\": \"pcm16\",\n \"input_audio_transcription\": {\n \"model\": \"whisper-1\"\n },\n \"turn_detection\": null,\n \"tools\": [],\n \"tool_choice\": \"none\",\n \"temperature\": 0.7,\n \"max_response_output_tokens\": 200\n }\n}\n" RealtimeSession: type: object properties: @@ -12445,6 +13353,309 @@ components: x-oaiMeta: name: The upload part object example: "{\n \"id\": \"part_def456\",\n \"object\": \"upload.part\",\n \"created_at\": 1719186911,\n \"upload_id\": \"upload_abc123\"\n}\n" + UsageAudioSpeechesResult: + required: + - object + - characters + - num_model_requests + type: object + properties: + object: + enum: + - organization.usage.audio_speeches.result + type: string + characters: + type: integer + description: The number of characters processed. + num_model_requests: + type: integer + description: The count of requests made to the model. + project_id: + type: string + description: 'When `group_by=project_id`, this field provides the project ID of the grouped usage result.' + user_id: + type: string + description: 'When `group_by=user_id`, this field provides the user ID of the grouped usage result.' + api_key_id: + type: string + description: 'When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.' + model: + type: string + description: 'When `group_by=model`, this field provides the model name of the grouped usage result.' + description: The aggregated audio speeches usage details of the specific time bucket. + x-oaiMeta: + name: Audio speeches usage object + example: "{\n \"object\": \"orgainzation.usage.audio_speeches.result\",\n \"characters\": 45,\n \"num_model_requests\": 1,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"tts-1\"\n}\n" + UsageAudioTranscriptionsResult: + required: + - object + - seconds + - num_model_requests + type: object + properties: + object: + enum: + - organization.usage.audio_transcriptions.result + type: string + seconds: + type: integer + description: The number of seconds processed. + num_model_requests: + type: integer + description: The count of requests made to the model. + project_id: + type: string + description: 'When `group_by=project_id`, this field provides the project ID of the grouped usage result.' + user_id: + type: string + description: 'When `group_by=user_id`, this field provides the user ID of the grouped usage result.' + api_key_id: + type: string + description: 'When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.' + model: + type: string + description: 'When `group_by=model`, this field provides the model name of the grouped usage result.' + description: The aggregated audio transcriptions usage details of the specific time bucket. + x-oaiMeta: + name: Audio transcriptions usage object + example: "{\n \"object\": \"orgainzation.usage.audio_transcriptions.result\",\n \"seconds\": 10,\n \"num_model_requests\": 1,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"tts-1\"\n}\n" + UsageCodeInterpreterSessionsResult: + required: + - object + - sessions + type: object + properties: + object: + enum: + - organization.usage.code_interpreter_sessions.result + type: string + sessions: + type: integer + description: The number of code interpreter sessions. + project_id: + type: string + description: 'When `group_by=project_id`, this field provides the project ID of the grouped usage result.' + description: The aggregated code interpreter sessions usage details of the specific time bucket. + x-oaiMeta: + name: Code interpreter sessions usage object + example: "{\n \"object\": \"orgainzation.usage.code_interpreter_sessions.result\",\n \"sessions\": 1,\n \"project_id\": \"proj_abc\"\n}\n" + UsageCompletionsResult: + required: + - object + - input_tokens + - output_tokens + - num_model_requests + type: object + properties: + object: + enum: + - organization.usage.completions.result + type: string + input_tokens: + type: integer + description: The number of input tokens used. + input_cached_tokens: + type: integer + description: The number of input tokens that has been cached from previous requests. + output_tokens: + type: integer + description: The number of output tokens used. + num_model_requests: + type: integer + description: The count of requests made to the model. + project_id: + type: string + description: 'When `group_by=project_id`, this field provides the project ID of the grouped usage result.' + user_id: + type: string + description: 'When `group_by=user_id`, this field provides the user ID of the grouped usage result.' + api_key_id: + type: string + description: 'When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.' + model: + type: string + description: 'When `group_by=model`, this field provides the model name of the grouped usage result.' + batch: + type: boolean + description: 'When `group_by=batch`, this field tells whether the grouped usage result is batch or not.' + description: The aggregated completions usage details of the specific time bucket. + x-oaiMeta: + name: Completions usage object + example: "{\n \"object\": \"orgainzation.usage.completions.result\",\n \"input_tokens\": 5000,\n \"output_tokens\": 1000,\n \"input_cached_tokens\": 4000,\n \"num_model_requests\": 5,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"batch\": false\n}\n" + UsageEmbeddingsResult: + required: + - object + - input_tokens + - num_model_requests + type: object + properties: + object: + enum: + - organization.usage.embeddings.result + type: string + input_tokens: + type: integer + description: The number of input tokens used. + num_model_requests: + type: integer + description: The count of requests made to the model. + project_id: + type: string + description: 'When `group_by=project_id`, this field provides the project ID of the grouped usage result.' + user_id: + type: string + description: 'When `group_by=user_id`, this field provides the user ID of the grouped usage result.' + api_key_id: + type: string + description: 'When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.' + model: + type: string + description: 'When `group_by=model`, this field provides the model name of the grouped usage result.' + description: The aggregated embeddings usage details of the specific time bucket. + x-oaiMeta: + name: Embeddings usage object + example: "{\n \"object\": \"orgainzation.usage.embeddings.result\",\n \"input_tokens\": 20,\n \"num_model_requests\": 2,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"text-embedding-ada-002-v2\"\n}\n" + UsageImagesResult: + required: + - object + - images + - num_model_requests + type: object + properties: + object: + enum: + - organization.usage.images.result + type: string + images: + type: integer + description: The number of images processed. + num_model_requests: + type: integer + description: The count of requests made to the model. + source: + type: string + description: 'When `group_by=source`, this field provides the source of the grouped usage result, possible values are `image.generation`, `image.edit`, `image.variation`.' + size: + type: string + description: 'When `group_by=size`, this field provides the image size of the grouped usage result.' + project_id: + type: string + description: 'When `group_by=project_id`, this field provides the project ID of the grouped usage result.' + user_id: + type: string + description: 'When `group_by=user_id`, this field provides the user ID of the grouped usage result.' + api_key_id: + type: string + description: 'When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.' + model: + type: string + description: 'When `group_by=model`, this field provides the model name of the grouped usage result.' + description: The aggregated images usage details of the specific time bucket. + x-oaiMeta: + name: Images usage object + example: "{\n \"object\": \"orgainzation.usage.images.result\",\n \"images\": 2,\n \"num_model_requests\": 2,\n \"size\": \"1024x1024\",\n \"source\": \"image.generation\",\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"dall-e-3\"\n}\n" + UsageModerationsResult: + required: + - object + - input_tokens + - num_model_requests + type: object + properties: + object: + enum: + - organization.usage.moderations.result + type: string + input_tokens: + type: integer + description: The number of input tokens used. + num_model_requests: + type: integer + description: The count of requests made to the model. + project_id: + type: string + description: 'When `group_by=project_id`, this field provides the project ID of the grouped usage result.' + user_id: + type: string + description: 'When `group_by=user_id`, this field provides the user ID of the grouped usage result.' + api_key_id: + type: string + description: 'When `group_by=api_key_id`, this field provides the API key ID of the grouped usage result.' + model: + type: string + description: 'When `group_by=model`, this field provides the model name of the grouped usage result.' + description: The aggregated moderations usage details of the specific time bucket. + x-oaiMeta: + name: Moderations usage object + example: "{\n \"object\": \"orgainzation.usage.moderations.result\",\n \"input_tokens\": 20,\n \"num_model_requests\": 2,\n \"project_id\": \"proj_abc\",\n \"user_id\": \"user-abc\",\n \"api_key_id\": \"key_abc\",\n \"model\": \"text-moderation\"\n}\n" + UsageResponse: + required: + - object + - data + - has_more + - next_page + type: object + properties: + object: + enum: + - page + type: string + data: + type: array + items: + $ref: '#/components/schemas/UsageTimeBucket' + has_more: + type: boolean + next_page: + type: string + UsageTimeBucket: + required: + - object + - start_time + - end_time + - result + type: object + properties: + object: + enum: + - bucket + type: string + start_time: + type: integer + end_time: + type: integer + result: + type: array + items: + oneOf: + - $ref: '#/components/schemas/UsageCompletionsResult' + - $ref: '#/components/schemas/UsageEmbeddingsResult' + - $ref: '#/components/schemas/UsageModerationsResult' + - $ref: '#/components/schemas/UsageImagesResult' + - $ref: '#/components/schemas/UsageAudioSpeechesResult' + - $ref: '#/components/schemas/UsageAudioTranscriptionsResult' + - $ref: '#/components/schemas/UsageVectorStoresResult' + - $ref: '#/components/schemas/UsageCodeInterpreterSessionsResult' + - $ref: '#/components/schemas/CostsResult' + UsageVectorStoresResult: + required: + - object + - usage_bytes + type: object + properties: + object: + enum: + - organization.usage.vector_stores.result + type: string + usage_bytes: + type: integer + description: The vector stores usage in bytes. + project_id: + type: string + description: 'When `group_by=project_id`, this field provides the project ID of the grouped usage result.' + description: The aggregated vector stores usage details of the specific time bucket. + x-oaiMeta: + name: Vector stores usage object + example: "{\n \"object\": \"orgainzation.usage.vector_stores.result\",\n \"usage_bytes\": 1024,\n \"project_id\": \"proj_abc\"\n}\n" User: required: - object @@ -14718,6 +15929,65 @@ x-oaiMeta: - type: object key: AuditLog path: object + - id: usage + title: Usage + description: "The **Usage API** provides detailed insights into your activity across the OpenAI API. It also includes a separate [Costs endpoint](/docs/api-reference/usage/costs), which offers visibility into your spend, breaking down consumption by invoice line items and project IDs.\n\nWhile the Usage API delivers granular usage data, it may not always reconcile perfectly with the Costs due to minor differences in how usage and spend are recorded. For financial purposes, we recommend using the [Costs endpoint](/docs/api-reference/usage/costs) or the [Costs tab](/settings/organization/usage) in the Usage Dashboard, which will reconcile back to your billing invoice.\n" + navigationGroup: administration + sections: + - type: endpoint + key: usage-completions + path: completions + - type: object + key: UsageCompletionsResult + path: completions_object + - type: endpoint + key: usage-embeddings + path: embeddings + - type: object + key: UsageEmbeddingsResult + path: embeddings_object + - type: endpoint + key: usage-moderations + path: moderations + - type: object + key: UsageModerationsResult + path: moderations_object + - type: endpoint + key: usage-images + path: images + - type: object + key: UsageImagesResult + path: images_object + - type: endpoint + key: usage-audio-speeches + path: audio_speeches + - type: object + key: UsageAudioSpeechesResult + path: audio_speeches_object + - type: endpoint + key: usage-audio-transcriptions + path: audio_transcriptions + - type: object + key: UsageAudioTranscriptionsResult + path: audio_transcriptions_object + - type: endpoint + key: usage-vector-stores + path: vector_stores + - type: object + key: UsageVectorStoresResult + path: vector_stores_object + - type: endpoint + key: usage-code-interpreter-sessions + path: code_interpreter_sessions + - type: object + key: UsageCodeInterpreterSessionsResult + path: code_interpreter_sessions_object + - type: endpoint + key: usage-costs + path: costs + - type: object + key: CostsResult + path: costs_object - id: realtime title: Realtime beta: true